From: jenkins-bot Date: Sat, 24 Aug 2019 23:15:36 +0000 (+0000) Subject: Merge "rdbms: make LBFactory close/rollback dangling handles like LoadBalancer" X-Git-Tag: 1.34.0-rc.0~596 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=b7b9cea32981e9bc1425b771b910b7f2ba1d0bde;hp=c3900f9f8ae920af79ddad588b68a49b9e11df19;p=lhc%2Fweb%2Fwiklou.git Merge "rdbms: make LBFactory close/rollback dangling handles like LoadBalancer" --- diff --git a/.mailmap b/.mailmap index 1265bd2f86..0f5413e4d3 100644 --- a/.mailmap +++ b/.mailmap @@ -59,7 +59,7 @@ Ariel Glenn Arlo Breault Arthur Richards Arthur Richards -Aryeh Gregor +Aryeh Gregor Asher Feldman Asher Feldman aude diff --git a/HISTORY b/HISTORY index ccdd2de0ee..4c5e344b3a 100644 --- a/HISTORY +++ b/HISTORY @@ -2234,7 +2234,7 @@ This is a security and maintenance release of the MediaWiki 1.29 branch. * (T194605, CVE-2018-0505) SECURITY: BotPasswords can bypass CentralAuth's account lock. * (T180551) Fix LanguageSrTest for language converter -* (T180552) Fix langauge converter parser test with self-close tags +* (T180552) Fix language converter parser test with self-close tags * (T180537) Remove $wgAuth usage from wrapOldPasswords.php * (T180485) InputBox: Have inputbox langconvert certain attributes * (T161732, T181547) Upgraded Moment.js from v2.15.0 to v2.19.3. diff --git a/INSTALL b/INSTALL index f31f753303..bf64ab76b0 100644 --- a/INSTALL +++ b/INSTALL @@ -11,8 +11,6 @@ Required software: ** MySQL 5.5.8 or higher ** PostgreSQL 9.2 or higher ** SQLite 3.8.0 or higher -** Oracle 9.0.1 or higher -** Microsoft SQL Server 2005 (9.00.1399) MediaWiki is developed and tested mainly on Unix/Linux platforms, but should work on Windows as well. diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 5e4f61d37a..df25d30c59 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -39,6 +39,7 @@ For notes on 1.33.x and older releases, see HISTORY. * editmyuserjsredirect user right – users without this right now cannot edit JS redirects in their userspace unless the target of the redirect is also in their userspace. By default, this right is given to everyone. +* (T226733) Add rate limiter to Special:ConfirmEmail. ==== Changed configuration ==== * $wgUseCdn, $wgCdnServers, $wgCdnServersNoPurge, and $wgCdnMaxAge – These four @@ -97,6 +98,10 @@ For notes on 1.33.x and older releases, see HISTORY. to add fields to Special:Mute. * (T100896) Skin authors can define custom OOUI themes using OOUIThemePaths. See for details. +* (T229035) The GetUserBlock hook was added. Use this instead of + GetBlockedStatus. +* ObjectFactory is available as a service. When used as a service, the object + specs can now specify needed DI services. === External library changes in 1.34 === @@ -340,7 +345,17 @@ because of Phabricator reports. * Database::getProperty(), deprecated in 1.28, has been removed. * IDatabase::getWikiId(), deprecated in 1.30, has been removed. Use IDatabase::getDomainID() instead. +* (T191231) Support for using Oracle or MSSQL as database backends has been + dropped. +* MessageCache::destroyInstance() has been removed. Instead, call + MediaWikiTestCase::resetServices(). +* SearchResult protected field $searchEngine is removed and no longer + initialized after calling SearchResult::initFromTitle(). +* The UserIsBlockedFrom hook is only called if a block is found first, and + should only be used to unblock a blocked user. * … +* Language::$dataCache has been removed (without prior deprecation, for + practical reasons). Use MediaWikiServices instead to get a LocalisationCache. === Deprecations in 1.34 === * The MWNamespace class is deprecated. Use NamespaceInfo. @@ -416,6 +431,8 @@ because of Phabricator reports. engines. * Skin::escapeSearchLink() is deprecated. Use Skin::getSearchLink() or the skin template option 'searchaction' instead. +* Skin::getRevisionId() and Skin::isRevisionCurrent() have been deprecated. + Use OutputPage::getRevisionId() and OutputPage::isRevisionCurrent() instead. * LoadBalancer::haveIndex() and LoadBalancer::isNonZeroLoad() have been deprecated. * FileBackend::getWikiId() has been deprecated. @@ -442,6 +459,18 @@ because of Phabricator reports. * SearchEngine::textAlreadyUpdatedForIndex() is deprecated, given the deprecation above this method is no longer needed/called and should not be implemented by SearchEngine implementation. +* IDatabase::bufferResults() has been deprecated. Use query batching instead. +* MessageCache::singleton() is deprecated. Use + MediaWikiServices::getMessageCache(). +* Constructing MovePage directly is deprecated. Use MovePageFactory. +* TempFSFile::factory() has been deprecated. Use TempFSFileFactory instead. +* wfIsBadImage() is deprecated. Use the BadFileLookup service instead. +* Language::getLocalisationCache() is deprecated. Use MediaWikiServices. +* The following Language methods are deprecated: isSupportedLanguage, + isValidCode, isValidBuiltInCode, isKnownLanguageTag, fetchLanguageNames, + fetchLanguageName, getFileName, getMessagesFileName, getJsonMessagesFileName. + Use the new LanguageNameUtils class instead. (Note that fetchLanguageName(s) + are called getLanguageName(s) in the new class.) === Other changes in 1.34 === * … @@ -452,16 +481,13 @@ supported, it is generally advised to use PHP 7.0.13 or later for long term support. MySQL/MariaDB is the recommended DBMS. PostgreSQL or SQLite can also be used, -but support for them is somewhat less mature. There is experimental support for -Oracle and Microsoft SQL Server. +but support for them is somewhat less mature. The supported versions are: * MySQL 5.5.8 or later * PostgreSQL 9.2 or later * SQLite 3.8.0 or later -* Oracle 9.0.1 or later -* Microsoft SQL Server 2005 (9.00.1399) == Online documentation == Documentation for both end-users and site administrators is available on diff --git a/autoload.php b/autoload.php index e4afbf52d6..9b122cbbff 100644 --- a/autoload.php +++ b/autoload.php @@ -20,7 +20,6 @@ $wgAutoloadLocalClasses = [ 'AllMessagesTablePager' => __DIR__ . '/includes/specials/pagers/AllMessagesTablePager.php', 'AllTrans' => __DIR__ . '/maintenance/language/alltrans.php', 'AlphabeticPager' => __DIR__ . '/includes/pager/AlphabeticPager.php', - 'AlterSharedConstraints' => __DIR__ . '/maintenance/oracle/alterSharedConstraints.php', 'AncientPagesPage' => __DIR__ . '/includes/specials/SpecialAncientpages.php', 'AnsiTermColorer' => __DIR__ . '/maintenance/term/MWTerm.php', 'ApiAMCreateAccount' => __DIR__ . '/includes/api/ApiAMCreateAccount.php', @@ -358,10 +357,8 @@ $wgAutoloadLocalClasses = [ 'DatabaseInstaller' => __DIR__ . '/includes/installer/DatabaseInstaller.php', 'DatabaseLag' => __DIR__ . '/maintenance/lag.php', 'DatabaseLogEntry' => __DIR__ . '/includes/logging/DatabaseLogEntry.php', - 'DatabaseMssql' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMssql.php', 'DatabaseMysqlBase' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMysqlBase.php', 'DatabaseMysqli' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMysqli.php', - 'DatabaseOracle' => __DIR__ . '/includes/db/DatabaseOracle.php', 'DatabasePostgres' => __DIR__ . '/includes/libs/rdbms/database/DatabasePostgres.php', 'DatabaseSqlite' => __DIR__ . '/includes/libs/rdbms/database/DatabaseSqlite.php', 'DatabaseUpdater' => __DIR__ . '/includes/installer/DatabaseUpdater.php', @@ -877,12 +874,14 @@ $wgAutoloadLocalClasses = [ 'MediaWikiSite' => __DIR__ . '/includes/site/MediaWikiSite.php', 'MediaWikiTitleCodec' => __DIR__ . '/includes/title/MediaWikiTitleCodec.php', 'MediaWikiVersionFetcher' => __DIR__ . '/includes/MediaWikiVersionFetcher.php', + 'MediaWiki\\BadFileLookup' => __DIR__ . '/includes/BadFileLookup.php', 'MediaWiki\\ChangeTags\\Taggable' => __DIR__ . '/includes/changetags/Taggable.php', 'MediaWiki\\Config\\ConfigRepository' => __DIR__ . '/includes/config/ConfigRepository.php', 'MediaWiki\\Config\\ServiceOptions' => __DIR__ . '/includes/config/ServiceOptions.php', 'MediaWiki\\DB\\PatchFileLocation' => __DIR__ . '/includes/db/PatchFileLocation.php', 'MediaWiki\\Diff\\ComplexityException' => __DIR__ . '/includes/diff/ComplexityException.php', 'MediaWiki\\Diff\\WordAccumulator' => __DIR__ . '/includes/diff/WordAccumulator.php', + 'MediaWiki\\FileBackend\\FSFile\\TempFSFileFactory' => __DIR__ . '/includes/libs/filebackend/fsfile/TempFSFileFactory.php', 'MediaWiki\\HeaderCallback' => __DIR__ . '/includes/HeaderCallback.php', 'MediaWiki\\Http\\HttpRequestFactory' => __DIR__ . '/includes/http/HttpRequestFactory.php', 'MediaWiki\\Installer\\InstallException' => __DIR__ . '/includes/installer/InstallException.php', @@ -893,6 +892,7 @@ $wgAutoloadLocalClasses = [ 'MediaWiki\\Languages\\Data\\CrhExceptions' => __DIR__ . '/languages/data/CrhExceptions.php', 'MediaWiki\\Languages\\Data\\Names' => __DIR__ . '/languages/data/Names.php', 'MediaWiki\\Languages\\Data\\ZhConversion' => __DIR__ . '/languages/data/ZhConversion.php', + 'MediaWiki\\Languages\\LanguageNameUtils' => __DIR__ . '/includes/language/LanguageNameUtils.php', 'MediaWiki\\Logger\\ConsoleLogger' => __DIR__ . '/includes/debug/logger/ConsoleLogger.php', 'MediaWiki\\Logger\\ConsoleSpi' => __DIR__ . '/includes/debug/logger/ConsoleSpi.php', 'MediaWiki\\Logger\\LegacyLogger' => __DIR__ . '/includes/debug/logger/LegacyLogger.php', @@ -916,6 +916,7 @@ $wgAutoloadLocalClasses = [ 'MediaWiki\\MediaWikiServices' => __DIR__ . '/includes/MediaWikiServices.php', 'MediaWiki\\Navigation\\PrevNextNavigationRenderer' => __DIR__ . '/includes/Navigation/PrevNextNavigationRenderer.php', 'MediaWiki\\OutputHandler' => __DIR__ . '/includes/OutputHandler.php', + 'MediaWiki\\Page\\MovePageFactory' => __DIR__ . '/includes/page/MovePageFactory.php', 'MediaWiki\\ProcOpenError' => __DIR__ . '/includes/exception/ProcOpenError.php', 'MediaWiki\\Search\\ParserOutputSearchDataExtractor' => __DIR__ . '/includes/search/ParserOutputSearchDataExtractor.php', 'MediaWiki\\Services\\CannotReplaceActiveServiceException' => __DIR__ . '/includes/libs/services/CannotReplaceActiveServiceException.php', @@ -974,7 +975,7 @@ $wgAutoloadLocalClasses = [ 'MediumSpecificBagOStuff' => __DIR__ . '/includes/libs/objectcache/MediumSpecificBagOStuff.php', 'MemcLockManager' => __DIR__ . '/includes/libs/lockmanager/MemcLockManager.php', 'MemcachedBagOStuff' => __DIR__ . '/includes/libs/objectcache/MemcachedBagOStuff.php', - 'MemcachedClient' => __DIR__ . '/includes/libs/objectcache/MemcachedClient.php', + 'MemcachedClient' => __DIR__ . '/includes/libs/objectcache/utils/MemcachedClient.php', 'MemcachedPeclBagOStuff' => __DIR__ . '/includes/libs/objectcache/MemcachedPeclBagOStuff.php', 'MemcachedPhpBagOStuff' => __DIR__ . '/includes/libs/objectcache/MemcachedPhpBagOStuff.php', 'MemoizedCallable' => __DIR__ . '/includes/libs/MemoizedCallable.php', @@ -1011,8 +1012,6 @@ $wgAutoloadLocalClasses = [ 'MoveLogFormatter' => __DIR__ . '/includes/logging/MoveLogFormatter.php', 'MovePage' => __DIR__ . '/includes/MovePage.php', 'MovePageForm' => __DIR__ . '/includes/specials/SpecialMovepage.php', - 'MssqlInstaller' => __DIR__ . '/includes/installer/MssqlInstaller.php', - 'MssqlUpdater' => __DIR__ . '/includes/installer/MssqlUpdater.php', 'MultiConfig' => __DIR__ . '/includes/config/MultiConfig.php', 'MultiHttpClient' => __DIR__ . '/includes/libs/http/MultiHttpClient.php', 'MultiWriteBagOStuff' => __DIR__ . '/includes/libs/objectcache/MultiWriteBagOStuff.php', @@ -1052,8 +1051,6 @@ $wgAutoloadLocalClasses = [ 'OldChangesList' => __DIR__ . '/includes/changes/OldChangesList.php', 'OldLocalFile' => __DIR__ . '/includes/filerepo/file/OldLocalFile.php', 'OldRevisionImporter' => __DIR__ . '/includes/import/OldRevisionImporter.php', - 'OracleInstaller' => __DIR__ . '/includes/installer/OracleInstaller.php', - 'OracleUpdater' => __DIR__ . '/includes/installer/OracleUpdater.php', 'OrderedStreamingForkController' => __DIR__ . '/includes/OrderedStreamingForkController.php', 'OrphanStats' => __DIR__ . '/maintenance/storage/orphanStats.php', 'Orphans' => __DIR__ . '/maintenance/orphans.php', @@ -1315,11 +1312,9 @@ $wgAutoloadLocalClasses = [ 'SearchHighlighter' => __DIR__ . '/includes/search/SearchHighlighter.php', 'SearchIndexField' => __DIR__ . '/includes/search/SearchIndexField.php', 'SearchIndexFieldDefinition' => __DIR__ . '/includes/search/SearchIndexFieldDefinition.php', - 'SearchMssql' => __DIR__ . '/includes/search/SearchMssql.php', 'SearchMySQL' => __DIR__ . '/includes/search/SearchMySQL.php', 'SearchNearMatchResultSet' => __DIR__ . '/includes/search/SearchNearMatchResultSet.php', 'SearchNearMatcher' => __DIR__ . '/includes/search/SearchNearMatcher.php', - 'SearchOracle' => __DIR__ . '/includes/search/SearchOracle.php', 'SearchPostgres' => __DIR__ . '/includes/search/SearchPostgres.php', 'SearchResult' => __DIR__ . '/includes/search/SearchResult.php', 'SearchResultSet' => __DIR__ . '/includes/search/SearchResultSet.php', @@ -1664,7 +1659,6 @@ $wgAutoloadLocalClasses = [ 'Wikimedia\\Rdbms\\DBUnexpectedError' => __DIR__ . '/includes/libs/rdbms/exception/DBUnexpectedError.php', 'Wikimedia\\Rdbms\\Database' => __DIR__ . '/includes/libs/rdbms/database/Database.php', 'Wikimedia\\Rdbms\\DatabaseDomain' => __DIR__ . '/includes/libs/rdbms/database/domain/DatabaseDomain.php', - 'Wikimedia\\Rdbms\\DatabaseMssql' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMssql.php', 'Wikimedia\\Rdbms\\DatabaseMysqlBase' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMysqlBase.php', 'Wikimedia\\Rdbms\\DatabaseMysqli' => __DIR__ . '/includes/libs/rdbms/database/DatabaseMysqli.php', 'Wikimedia\\Rdbms\\DatabasePostgres' => __DIR__ . '/includes/libs/rdbms/database/DatabasePostgres.php', diff --git a/docs/hooks.txt b/docs/hooks.txt index d832012df5..b7ea02cea3 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -91,23 +91,29 @@ title-reversing if-blocks spread all over the codebase in showAnArticle, deleteAnArticle, exportArticle, etc., we can concentrate it all in an extension file: - function reverseArticleTitle( $article ) { + function onArticleShow( &$article ) { # ... } - function reverseForExport( $article ) { + function onArticleDelete( &$article ) { # ... } -The setup function for the extension just has to add its hook functions to the -appropriate events: - - setupTitleReversingExtension() { - global $wgHooks; + function onArticleExport( &$article ) { + # ... + } - $wgHooks['ArticleShow'][] = 'reverseArticleTitle'; - $wgHooks['ArticleDelete'][] = 'reverseArticleTitle'; - $wgHooks['ArticleExport'][] = 'reverseForExport'; +General practice is to have a dedicated file for functions activated by hooks, +which functions named 'onHookName'. In the example above, the file +'ReverseHooks.php' includes the functions that should be activated by the +'ArticleShow', 'ArticleDelete', and 'ArticleExport' hooks. The 'extension.json' +file with the extension's registration just has to add its hook functions +to the appropriate events: + + "Hooks": { + "ArticleShow": "ReverseHooks:onArticleShow", + "ArticleDelete": "ReverseHooks::onArticleDelete", + "ArticleExport": "ReverseHooks::onArticleExport" } Having all this code related to the title-reversion option in one place means @@ -1720,6 +1726,11 @@ $contentHandler: ContentHandler for which the slot diff renderer is fetched. &$slotDiffRenderer: SlotDiffRenderer to change or replace. $context: IContextSource +'GetUserBlock': Modify the block found by the block manager. This may be a +single block or a composite block made from multiple blocks; the original +blocks can be seen using CompositeBlock::getOriginalBlocks() +&$block: AbstractBlock object + 'getUserPermissionsErrors': Add a permissions error when permissions errors are checked for. Use instead of userCan for most cases. Return false if the user can't do it, and populate $result with the reason in the form of @@ -3205,6 +3216,9 @@ $request: WebRequest object for getting the value provided by the current user $sp: SpecialPage object, for context &$fields: Current HTMLForm fields descriptors +'SpecialMuteSubmit': DEPRECATED since 1.34! Used only for instrumentation on SpecialMute +$data: Array containing information about submitted options on SpecialMute form + 'SpecialNewpagesConditions': Called when building sql query for Special:NewPages. &$special: NewPagesPager object (subclass of ReverseChronologicalPager) @@ -3490,6 +3504,12 @@ processing. &$archive: PageArchive object $title: Title object of the page that we're about to undelete +'UndeletePageToolLinks': Add one or more links to edit page subtitle when a page +has been previously deleted. +$context: IContextSource (object) +$linkRenderer: LinkRenderer instance +&$links: Array of HTML strings + 'UndeleteShowRevision': Called when showing a revision in Special:Undelete. $title: title object related to the revision $rev: revision (object) that will be viewed @@ -3691,7 +3711,7 @@ $newUGMs: An associative array (group name => UserGroupMembership object) of the user's current group memberships. 'UserIsBlockedFrom': Check if a user is blocked from a specific page (for -specific block exemptions). +specific block exemptions if a user is already blocked). $user: User in question $title: Title of the page in question &$blocked: Out-param, whether or not the user is blocked from that page. diff --git a/docs/pageupdater.txt b/docs/pageupdater.txt index fd084c0587..3d113f6569 100644 --- a/docs/pageupdater.txt +++ b/docs/pageupdater.txt @@ -148,7 +148,7 @@ parent of $revision parameter passed to prepareUpdate(). transformation (PST) and allow subsequent access to the canonical ParserOutput of the revision. getSlots() and getCanonicalParserOutput() as well as getSecondaryDataUpdates() may be used after prepareContent() was called. Calling prepareContent() with the same -parameters again has no effect. Calling it again with mismatching paramters, or calling +parameters again has no effect. Calling it again with mismatching parameters, or calling it after prepareUpdate() was called, triggers a LogicException. - prepareUpdate() is called after the new revision has been created. This may happen diff --git a/img_auth.php b/img_auth.php index 914014d85f..6e45e4eba5 100644 --- a/img_auth.php +++ b/img_auth.php @@ -53,9 +53,10 @@ $mediawiki->doPostOutputShutdown( 'fast' ); function wfImageAuthMain() { global $wgImgAuthUrlPathMap; + $permissionManager = \MediaWiki\MediaWikiServices::getInstance()->getPermissionManager(); $request = RequestContext::getMain()->getRequest(); - $publicWiki = in_array( 'read', User::getGroupPermissions( [ '*' ] ), true ); + $publicWiki = in_array( 'read', $permissionManager->getGroupPermissions( [ '*' ] ), true ); // Get the requested file path (source file or thumbnail) $matches = WebRequest::getPathInfo(); @@ -160,7 +161,6 @@ function wfImageAuthMain() { // Check user authorization for this title // Checks Whitelist too - $permissionManager = \MediaWiki\MediaWikiServices::getInstance()->getPermissionManager(); if ( !$permissionManager->userCan( 'read', $user, $title ) ) { wfForbidden( 'img-auth-accessdenied', 'img-auth-noread', $name ); diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index f6c9075136..ea10a2e863 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -114,6 +114,7 @@ class AjaxDispatcher { return; } + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); if ( !in_array( $this->func_name, $this->config->get( 'AjaxExportList' ) ) ) { wfDebug( __METHOD__ . ' Bad Request for unknown function ' . $this->func_name . "\n" ); wfHttpError( @@ -121,7 +122,8 @@ class AjaxDispatcher { 'Bad Request', "unknown function " . $this->func_name ); - } elseif ( !User::isEveryoneAllowed( 'read' ) && !$user->isAllowed( 'read' ) ) { + } elseif ( !$permissionManager->isEveryoneAllowed( 'read' ) && + !$permissionManager->userHasRight( $user, 'read' ) ) { wfHttpError( 403, 'Forbidden', diff --git a/includes/Autopromote.php b/includes/Autopromote.php index b17f1ab1c6..2156787886 100644 --- a/includes/Autopromote.php +++ b/includes/Autopromote.php @@ -21,6 +21,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * This class checks if user can get extra rights * because of conditions specified in $wgAutopromote @@ -200,7 +202,9 @@ class Autopromote { case APCOND_BLOCKED: return $user->getBlock() && $user->getBlock()->isSitewide(); case APCOND_ISBOT: - return in_array( 'bot', User::getGroupPermissions( $user->getGroups() ) ); + return in_array( 'bot', MediaWikiServices::getInstance() + ->getPermissionManager() + ->getGroupPermissions( $user->getGroups() ) ); default: $result = null; Hooks::run( 'AutopromoteCondition', [ $cond[0], diff --git a/includes/BadFileLookup.php b/includes/BadFileLookup.php new file mode 100644 index 0000000000..2f7c0eade3 --- /dev/null +++ b/includes/BadFileLookup.php @@ -0,0 +1,127 @@ +blacklistCallback = $blacklistCallback; + $this->cache = $cache; + $this->repoGroup = $repoGroup; + $this->titleParser = $titleParser; + } + + /** + * Determine if a file exists on the 'bad image list'. + * + * The format of MediaWiki:Bad_image_list is as follows: + * * Only list items (lines starting with "*") are considered + * * The first link on a line must be a link to a bad file + * * Any subsequent links on the same line are considered to be exceptions, + * i.e. articles where the file may occur inline. + * + * @param string $name The file name to check + * @param LinkTarget|null $contextTitle The page on which the file occurs, if known + * @return bool + */ + public function isBadFile( $name, LinkTarget $contextTitle = null ) { + // Handle redirects; callers almost always hit wfFindFile() anyway, so just use that method + // because it has a fast process cache. + $file = $this->repoGroup->findFile( $name ); + // XXX If we don't find the file we also don't replace spaces by underscores or otherwise + // validate or normalize the title, is this right? + if ( $file ) { + $name = $file->getTitle()->getDBkey(); + } + + // Run the extension hook + $bad = false; + if ( !Hooks::run( 'BadImage', [ $name, &$bad ] ) ) { + return (bool)$bad; + } + + if ( $this->badFiles === null ) { + // Not used before in this request, try the cache + $blacklist = ( $this->blacklistCallback )(); + $key = $this->cache->makeKey( 'bad-image-list', sha1( $blacklist ) ); + $this->badFiles = $this->cache->get( $key ) ?: null; + } + + if ( $this->badFiles === null ) { + // Cache miss, build the list now + $this->badFiles = []; + $lines = explode( "\n", $blacklist ); + foreach ( $lines as $line ) { + // List items only + if ( substr( $line, 0, 1 ) !== '*' ) { + continue; + } + + // Find all links + $m = []; + // XXX What is the ':?' doing in the regex? Why not let the TitleParser strip it? + if ( !preg_match_all( '/\[\[:?(.*?)\]\]/', $line, $m ) ) { + continue; + } + + $fileDBkey = null; + $exceptions = []; + foreach ( $m[1] as $i => $titleText ) { + try { + $title = $this->titleParser->parseTitle( $titleText ); + } catch ( MalformedTitleException $e ) { + continue; + } + if ( $i == 0 ) { + $fileDBkey = $title->getDBkey(); + } else { + $exceptions[$title->getNamespace()][$title->getDBkey()] = true; + } + } + + if ( $fileDBkey !== null ) { + $this->badFiles[$fileDBkey] = $exceptions; + } + } + $this->cache->set( $key, $this->badFiles, 24 * 60 * 60 ); + } + + return isset( $this->badFiles[$name] ) && ( !$contextTitle || + !isset( $this->badFiles[$name][$contextTitle->getNamespace()] + [$contextTitle->getDBkey()] ) ); + } +} diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 1b348f3d3b..8341dac19a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -330,15 +330,22 @@ $wgAppleTouchIcon = false; $wgReferrerPolicy = false; /** - * The local filesystem path to a temporary directory. This is not required to - * be web accessible. + * The local filesystem path to a temporary directory. This must not be web accessible. * - * When this setting is set to false, its value will be set through a call - * to wfTempDir(). See that methods implementation for the actual detection - * logic. + * When this setting is set to false, its value will automatically be decided + * through the first call to wfTempDir(). See that method's implementation for + * the actual detection logic. * - * Developers should use the global function wfTempDir() instead of this - * variable. + * To find the temporary path for the current wiki, developers must not use + * this variable directly. Use the global function wfTempDir() instead. + * + * The temporary directory is expected to be shared with other applications, + * including other MediaWiki instances (which might not run the same version + * or configution). When storing files here, take care to avoid conflicts + * with other instances of MediaWiki. For example, when caching the result + * of a computation, the file name should incorporate the input of the + * computation so that it cannot be confused for the result of a similar + * computation by another MediaWiki instance. * * @see wfTempDir() * @note Default changed to false in MediaWiki 1.20. @@ -1880,6 +1887,36 @@ $wgUsersNotifiedOnAllChanges = []; * @{ */ +/** + * Current wiki database name + * + * Should be alphanumeric, without spaces nor hyphens. + * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain). + * + * This should still be set even if $wgLBFactoryConf is configured. + */ +$wgDBname = 'my_wiki'; + +/** + * Current wiki database schema name + * + * Should be alphanumeric, without spaces nor hyphens. + * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain). + * + * This should still be set even if $wgLBFactoryConf is configured. + */ +$wgDBmwschema = null; + +/** + * Current wiki database table name prefix + * + * Should be alphanumeric, without spaces nor hyphens, preferably ending in an underscore. + * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain). + * + * This should still be set even if $wgLBFactoryConf is configured. + */ +$wgDBprefix = ''; + /** * Database host name or IP address */ @@ -1890,11 +1927,6 @@ $wgDBserver = 'localhost'; */ $wgDBport = 5432; -/** - * Name of the database; this should be alphanumeric and not contain spaces nor hyphens - */ -$wgDBname = 'my_wiki'; - /** * Database username */ @@ -1957,13 +1989,6 @@ $wgSearchType = null; */ $wgSearchTypeAlternatives = null; -/** - * Table name prefix. - * Should be alphanumeric plus underscores, and not contain spaces nor hyphens. - * Suggested format ends with an underscore. - */ -$wgDBprefix = ''; - /** * MySQL table options to use during installation or update */ @@ -1977,11 +2002,6 @@ $wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary'; */ $wgSQLMode = ''; -/** - * Mediawiki schema; this should be alphanumeric and not contain spaces nor hyphens - */ -$wgDBmwschema = null; - /** * Default group to use when getting database connections. * Will be used as default query group in ILoadBalancer::getConnection. @@ -2616,6 +2636,8 @@ $wgLocalisationCacheConf = [ 'store' => 'detect', 'storeClass' => false, 'storeDirectory' => false, + 'storeServer' => [], + 'forceRecache' => false, 'manualRecache' => false, ]; @@ -5704,6 +5726,11 @@ $wgRateLimits = [ 'ip-all' => [ 10, 3600 ], 'user' => [ 4, 86400 ] ], + // since 1.33 - rate limit email confirmations + 'confirmemail' => [ + 'ip-all' => [ 10, 3600 ], + 'user' => [ 4, 86400 ] + ], // Purging pages 'purge' => [ 'ip' => [ 30, 60 ], @@ -5796,6 +5823,7 @@ $wgGrantPermissions = []; // @TODO: clean up grants // @TODO: auto-include read/editsemiprotected rights? +$wgGrantPermissions['basic']['autocreateaccount'] = true; $wgGrantPermissions['basic']['autoconfirmed'] = true; $wgGrantPermissions['basic']['autopatrol'] = true; $wgGrantPermissions['basic']['editsemiprotected'] = true; @@ -5847,6 +5875,7 @@ $wgGrantPermissions['createeditmovepage']['move'] = true; $wgGrantPermissions['createeditmovepage']['move-rootuserpages'] = true; $wgGrantPermissions['createeditmovepage']['move-subpages'] = true; $wgGrantPermissions['createeditmovepage']['move-categorypages'] = true; +$wgGrantPermissions['createeditmovepage']['suppressredirect'] = true; $wgGrantPermissions['uploadfile']['upload'] = true; $wgGrantPermissions['uploadfile']['reupload-own'] = true; @@ -9081,6 +9110,16 @@ $wgFeaturePolicyReportOnly = []; */ $wgSpecialSearchFormOptions = []; +/** + * Toggles native image lazy loading, via the "loading" attribute. + * + * @warning EXPERIMENTAL! + * + * @since 1.34 + * @var array + */ +$wgNativeImageLazyLoading = false; + /** * For really cool vim folding this needs to be at the end: * vim: foldmarker=@{,@} foldmethod=marker diff --git a/includes/EditPage.php b/includes/EditPage.php index 74ec883a06..d0a5080d0b 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1593,7 +1593,8 @@ class EditPage { // This is needed since PageUpdater no longer checks these rights! // Allow bots to exempt some edits from bot flagging - $bot = $this->context->getUser()->isAllowed( 'bot' ) && $this->bot; + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + $bot = $permissionManager->userHasRight( $this->context->getUser(), 'bot' ) && $this->bot; $status = $this->internalAttemptSave( $resultDetails, $bot ); Hooks::run( 'EditPage::attemptSave:after', [ $this, $status, $resultDetails ] ); @@ -1870,6 +1871,7 @@ ERROR; public function internalAttemptSave( &$result, $bot = false ) { $status = Status::newGood(); $user = $this->context->getUser(); + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); if ( !Hooks::run( 'EditPage::attemptSave', [ $this ] ) ) { wfDebug( "Hook 'EditPage::attemptSave' aborted article saving\n" ); @@ -1918,7 +1920,7 @@ ERROR; # Check image redirect if ( $this->mTitle->getNamespace() == NS_FILE && $textbox_content->isRedirect() && - !$user->isAllowed( 'upload' ) + !$permissionManager->userHasRight( $user, 'upload' ) ) { $code = $user->isAnon() ? self::AS_IMAGE_REDIRECT_ANON : self::AS_IMAGE_REDIRECT_LOGGED; $status->setResult( false, $code ); @@ -1968,7 +1970,7 @@ ERROR; return $status; } - if ( $user->isBlockedFrom( $this->mTitle ) ) { + if ( $permissionManager->isBlockedFrom( $user, $this->mTitle ) ) { // Auto-block user's IP if the account was "hard" blocked if ( !wfReadOnly() ) { $user->spreadAnyEditBlock(); @@ -1988,7 +1990,7 @@ ERROR; return $status; } - if ( !$user->isAllowed( 'edit' ) ) { + if ( !$permissionManager->userHasRight( $user, 'edit' ) ) { if ( $user->isAnon() ) { $status->setResult( false, self::AS_READ_ONLY_PAGE_ANON ); return $status; @@ -1999,15 +2001,13 @@ ERROR; } } - $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); - $changingContentModel = false; if ( $this->contentModel !== $this->mTitle->getContentModel() ) { if ( !$config->get( 'ContentHandlerUseDB' ) ) { $status->fatal( 'editpage-cannot-use-custom-model' ); $status->value = self::AS_CANNOT_USE_CUSTOM_MODEL; return $status; - } elseif ( !$user->isAllowed( 'editcontentmodel' ) ) { + } elseif ( !$permissionManager->userHasRight( $user, 'editcontentmodel' ) ) { $status->setResult( false, self::AS_NO_CHANGE_CONTENT_MODEL ); return $status; } @@ -4159,7 +4159,8 @@ ERROR; $user = $this->context->getUser(); // don't show the minor edit checkbox if it's a new page or section - if ( !$this->isNew && $user->isAllowed( 'minoredit' ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( !$this->isNew && $permissionManager->userHasRight( $user, 'minoredit' ) ) { $checkboxes['wpMinoredit'] = [ 'id' => 'wpMinoredit', 'label-message' => 'minoredit', @@ -4446,8 +4447,8 @@ ERROR; protected function addPageProtectionWarningHeaders() { $out = $this->context->getOutput(); if ( $this->mTitle->isProtected( 'edit' ) && - MediaWikiServices::getInstance()->getNamespaceInfo()->getRestrictionLevels( - $this->mTitle->getNamespace() + MediaWikiServices::getInstance()->getPermissionManager()->getNamespaceRestrictionLevels( + $this->getTitle()->getNamespace() ) !== [ '' ] ) { # Is the title semi-protected? diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 5aa6edf879..8272ccf767 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -79,7 +79,9 @@ class FileDeleteForm { $this->oldimage = $wgRequest->getText( 'oldimage', false ); $token = $wgRequest->getText( 'wpEditToken' ); # Flag to hide all contents of the archived revisions - $suppress = $wgRequest->getCheck( 'wpSuppress' ) && $wgUser->isAllowed( 'suppressrevision' ); + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + $suppress = $wgRequest->getCheck( 'wpSuppress' ) && + $permissionManager->userHasRight( $wgUser, 'suppressrevision' ); if ( $this->oldimage ) { $this->oldfile = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( @@ -245,6 +247,7 @@ class FileDeleteForm { */ private function showForm() { global $wgOut, $wgUser, $wgRequest; + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); $wgOut->addModules( 'mediawiki.action.delete.file' ); @@ -296,7 +299,7 @@ class FileDeleteForm { ] ); - if ( $wgUser->isAllowed( 'suppressrevision' ) ) { + if ( $permissionManager->userHasRight( $wgUser, 'suppressrevision' ) ) { $fields[] = new OOUI\FieldLayout( new OOUI\CheckboxInputWidget( [ 'name' => 'wpSuppress', @@ -370,7 +373,7 @@ class FileDeleteForm { ] ) ); - if ( $wgUser->isAllowed( 'editinterface' ) ) { + if ( $permissionManager->userHasRight( $wgUser, 'editinterface' ) ) { $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer(); $link = $linkRenderer->makeKnownLink( $wgOut->msg( 'filedelete-reason-dropdown' )->inContentLanguage()->getTitle(), diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 1741958681..cc998c7223 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -24,14 +24,15 @@ if ( !defined( 'MEDIAWIKI' ) ) { die( "This file is part of MediaWiki, it is not a valid entry point" ); } +use MediaWiki\BadFileLookup; use MediaWiki\Linker\LinkTarget; use MediaWiki\Logger\LoggerFactory; use MediaWiki\MediaWikiServices; use MediaWiki\ProcOpenError; use MediaWiki\Session\SessionManager; use MediaWiki\Shell\Shell; -use Wikimedia\WrappedString; use Wikimedia\AtEase\AtEase; +use Wikimedia\WrappedString; /** * Load an extension @@ -2907,72 +2908,27 @@ function wfUnpack( $format, $data, $length = false ) { * * Any subsequent links on the same line are considered to be exceptions, * i.e. articles where the image may occur inline. * + * @deprecated since 1.34, use the BadFileLookup service directly instead + * * @param string $name The image name to check * @param Title|bool $contextTitle The page on which the image occurs, if known * @param string|null $blacklist Wikitext of a file blacklist * @return bool */ function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) { - # Handle redirects; callers almost always hit wfFindFile() anyway, - # so just use that method because it has a fast process cache. - $file = MediaWikiServices::getInstance()->getRepoGroup()->findFile( $name ); // get the final name - $name = $file ? $file->getTitle()->getDBkey() : $name; - - # Run the extension hook - $bad = false; - if ( !Hooks::run( 'BadImage', [ $name, &$bad ] ) ) { - return (bool)$bad; - } - - $cache = ObjectCache::getLocalServerInstance( 'hash' ); - $key = $cache->makeKey( - 'bad-image-list', ( $blacklist === null ) ? 'default' : md5( $blacklist ) - ); - $badImages = $cache->get( $key ); - - if ( $badImages === false ) { // cache miss - if ( $blacklist === null ) { - $blacklist = wfMessage( 'bad_image_list' )->inContentLanguage()->plain(); // site list - } - # Build the list now - $badImages = []; - $lines = explode( "\n", $blacklist ); - foreach ( $lines as $line ) { - # List items only - if ( substr( $line, 0, 1 ) !== '*' ) { - continue; - } - - # Find all links - $m = []; - if ( !preg_match_all( '/\[\[:?(.*?)\]\]/', $line, $m ) ) { - continue; - } - - $exceptions = []; - $imageDBkey = false; - foreach ( $m[1] as $i => $titleText ) { - $title = Title::newFromText( $titleText ); - if ( !is_null( $title ) ) { - if ( $i == 0 ) { - $imageDBkey = $title->getDBkey(); - } else { - $exceptions[$title->getPrefixedDBkey()] = true; - } - } - } - - if ( $imageDBkey !== false ) { - $badImages[$imageDBkey] = $exceptions; - } - } - $cache->set( $key, $badImages, 60 ); - } - - $contextKey = $contextTitle ? $contextTitle->getPrefixedDBkey() : false; - $bad = isset( $badImages[$name] ) && !isset( $badImages[$name][$contextKey] ); - - return $bad; + $services = MediaWikiServices::getInstance(); + if ( $blacklist !== null ) { + wfDeprecated( __METHOD__ . ' with $blacklist parameter', '1.34' ); + return ( new BadFileLookup( + function () use ( $blacklist ) { + return $blacklist; + }, + $services->getLocalServerObjectCache(), + $services->getRepoGroup(), + $services->getTitleParser() + ) )->isBadFile( $name, $contextTitle ?: null ); + } + return $services->getBadFileLookup()->isBadFile( $name, $contextTitle ?: null ); } /** diff --git a/includes/Linker.php b/includes/Linker.php index db3e2f5f03..47be8a27ea 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -978,7 +978,9 @@ class Linker { $items[] = self::link( $contribsPage, wfMessage( 'contribslink' )->escaped(), $attribs ); } - if ( $blockable && $wgUser->isAllowed( 'block' ) ) { + $userCanBlock = MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $wgUser, 'block' ); + if ( $blockable && $userCanBlock ) { $items[] = self::blockLink( $userId, $userText ); } @@ -2103,8 +2105,10 @@ class Linker { * @return string HTML fragment */ public static function getRevDeleteLink( User $user, Revision $rev, LinkTarget $title ) { - $canHide = $user->isAllowed( 'deleterevision' ); - if ( !$canHide && !( $rev->getVisibility() && $user->isAllowed( 'deletedhistory' ) ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + $canHide = $permissionManager->userHasRight( $user, 'deleterevision' ); + $canHideHistory = $permissionManager->userHasRight( $user, 'deletedhistory' ); + if ( !$canHide && !( $rev->getVisibility() && $canHideHistory ) ) { return ''; } diff --git a/includes/MWNamespace.php b/includes/MWNamespace.php index 0121bd589c..4a911b0819 100644 --- a/includes/MWNamespace.php +++ b/includes/MWNamespace.php @@ -318,8 +318,9 @@ class MWNamespace { * @return array */ public static function getRestrictionLevels( $index, User $user = null ) { - return MediaWikiServices::getInstance()->getNamespaceInfo()-> - getRestrictionLevels( $index, $user ); + return MediaWikiServices::getInstance() + ->getPermissionManager() + ->getNamespaceRestrictionLevels( $index, $user ); } /** diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php index 7fda45280a..e926c3289e 100644 --- a/includes/MediaWikiServices.php +++ b/includes/MediaWikiServices.php @@ -14,14 +14,18 @@ use GlobalVarConfig; use Hooks; use IBufferingStatsdDataFactory; use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface; +use LocalisationCache; use MediaWiki\Block\BlockManager; use MediaWiki\Block\BlockRestrictionStore; +use MediaWiki\FileBackend\FSFile\TempFSFileFactory; use MediaWiki\Http\HttpRequestFactory; +use MediaWiki\Languages\LanguageNameUtils; +use MediaWiki\Page\MovePageFactory; use MediaWiki\Permissions\PermissionManager; use MediaWiki\Preferences\PreferencesFactory; -use MediaWiki\Shell\CommandFactory; use MediaWiki\Revision\RevisionRenderer; use MediaWiki\Revision\SlotRoleRegistry; +use MediaWiki\Shell\CommandFactory; use MediaWiki\Special\SpecialPageFactory; use MediaWiki\Storage\BlobStore; use MediaWiki\Storage\BlobStoreFactory; @@ -40,6 +44,7 @@ use MediaWiki\Config\ConfigRepository; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkRendererFactory; use MWException; +use MessageCache; use MimeAnalyzer; use NamespaceInfo; use ObjectCache; @@ -61,6 +66,7 @@ use SkinFactory; use TitleFormatter; use TitleParser; use VirtualRESTServiceClient; +use Wikimedia\ObjectFactory; use Wikimedia\Rdbms\LBFactory; use Wikimedia\Services\SalvageableService; use Wikimedia\Services\ServiceContainer; @@ -426,6 +432,14 @@ class MediaWikiServices extends ServiceContainer { return $this->getService( 'ActorMigration' ); } + /** + * @since 1.34 + * @return BadFileLookup + */ + public function getBadFileLookup() : BadFileLookup { + return $this->getService( 'BadFileLookup' ); + } + /** * @since 1.31 * @return BlobStore @@ -611,6 +625,14 @@ class MediaWikiServices extends ServiceContainer { return $this->getService( 'InterwikiLookup' ); } + /** + * @since 1.34 + * @return LanguageNameUtils + */ + public function getLanguageNameUtils() { + return $this->getService( 'LanguageNameUtils' ); + } + /** * @since 1.28 * @return LinkCache @@ -638,6 +660,14 @@ class MediaWikiServices extends ServiceContainer { return $this->getService( 'LinkRendererFactory' ); } + /** + * @since 1.34 + * @return LocalisationCache + */ + public function getLocalisationCache() : LocalisationCache { + return $this->getService( 'LocalisationCache' ); + } + /** * @since 1.28 * @return \BagOStuff @@ -689,6 +719,14 @@ class MediaWikiServices extends ServiceContainer { return $this->getService( 'MediaHandlerFactory' ); } + /** + * @since 1.34 + * @return MessageCache + */ + public function getMessageCache() : MessageCache { + return $this->getService( 'MessageCache' ); + } + /** * @since 1.28 * @return MimeAnalyzer @@ -697,6 +735,14 @@ class MediaWikiServices extends ServiceContainer { return $this->getService( 'MimeAnalyzer' ); } + /** + * @since 1.34 + * @return MovePageFactory + */ + public function getMovePageFactory() : MovePageFactory { + return $this->getService( 'MovePageFactory' ); + } + /** * @since 1.34 * @return NamespaceInfo @@ -713,6 +759,17 @@ class MediaWikiServices extends ServiceContainer { return $this->getService( 'NameTableStoreFactory' ); } + /** + * ObjectFactory is intended for instantiating "handlers" from declarative definitions, + * such as Action API modules, special pages, or REST API handlers. + * + * @since 1.34 + * @return ObjectFactory + */ + public function getObjectFactory() { + return $this->getService( 'ObjectFactory' ); + } + /** * @since 1.32 * @return OldRevisionImporter @@ -946,6 +1003,14 @@ class MediaWikiServices extends ServiceContainer { return $this->getService( 'StatsdDataFactory' ); } + /** + * @since 1.34 + * @return TempFSFileFactory + */ + public function getTempFSFileFactory() : TempFSFileFactory { + return $this->getService( 'TempFSFileFactory' ); + } + /** * @since 1.28 * @return TitleFormatter diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index 6bd4471723..4045a5436b 100644 --- a/includes/MergeHistory.php +++ b/includes/MergeHistory.php @@ -178,7 +178,8 @@ class MergeHistory { } // Check mergehistory permission - if ( !$user->isAllowed( 'mergehistory' ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( !$permissionManager->userHasRight( $user, 'mergehistory' ) ) { // User doesn't have the right to merge histories $status->fatal( 'mergehistory-fail-permission' ); } diff --git a/includes/MovePage.php b/includes/MovePage.php index 832e24af81..e6faacef47 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -19,9 +19,13 @@ * @file */ +use MediaWiki\Config\ServiceOptions; use MediaWiki\MediaWikiServices; +use MediaWiki\Page\MovePageFactory; +use MediaWiki\Permissions\PermissionManager; use MediaWiki\Revision\SlotRecord; use Wikimedia\Rdbms\IDatabase; +use Wikimedia\Rdbms\LoadBalancer; /** * Handles the backend logic of moving a page from one title @@ -41,9 +45,69 @@ class MovePage { */ protected $newTitle; - public function __construct( Title $oldTitle, Title $newTitle ) { + /** + * @var ServiceOptions + */ + protected $options; + + /** + * @var LoadBalancer + */ + protected $loadBalancer; + + /** + * @var NamespaceInfo + */ + protected $nsInfo; + + /** + * @var WatchedItemStore + */ + protected $watchedItems; + + /** + * @var PermissionManager + */ + protected $permMgr; + + /** + * @var RepoGroup + */ + protected $repoGroup; + + /** + * Calling this directly is deprecated in 1.34. Use MovePageFactory instead. + * + * @param Title $oldTitle + * @param Title $newTitle + * @param ServiceOptions|null $options + * @param LoadBalancer|null $loadBalancer + * @param NamespaceInfo|null $nsInfo + * @param WatchedItemStore|null $watchedItems + * @param PermissionManager|null $permMgr + */ + public function __construct( + Title $oldTitle, + Title $newTitle, + ServiceOptions $options = null, + LoadBalancer $loadBalancer = null, + NamespaceInfo $nsInfo = null, + WatchedItemStore $watchedItems = null, + PermissionManager $permMgr = null, + RepoGroup $repoGroup = null + ) { $this->oldTitle = $oldTitle; $this->newTitle = $newTitle; + $this->options = $options ?? + new ServiceOptions( MovePageFactory::$constructorOptions, + MediaWikiServices::getInstance()->getMainConfig() ); + $this->loadBalancer = + $loadBalancer ?? MediaWikiServices::getInstance()->getDBLoadBalancer(); + $this->nsInfo = $nsInfo ?? MediaWikiServices::getInstance()->getNamespaceInfo(); + $this->watchedItems = + $watchedItems ?? MediaWikiServices::getInstance()->getWatchedItemStore(); + $this->permMgr = $permMgr ?? MediaWikiServices::getInstance()->getPermissionManager(); + $this->repoGroup = $repoGroup ?? MediaWikiServices::getInstance()->getRepoGroup(); } /** @@ -58,10 +122,10 @@ class MovePage { $status = new Status(); $errors = wfMergeErrorArrays( - $this->oldTitle->getUserPermissionsErrors( 'move', $user ), - $this->oldTitle->getUserPermissionsErrors( 'edit', $user ), - $this->newTitle->getUserPermissionsErrors( 'move-target', $user ), - $this->newTitle->getUserPermissionsErrors( 'edit', $user ) + $this->permMgr->getPermissionErrors( 'move', $user, $this->oldTitle ), + $this->permMgr->getPermissionErrors( 'edit', $user, $this->oldTitle ), + $this->permMgr->getPermissionErrors( 'move-target', $user, $this->newTitle ), + $this->permMgr->getPermissionErrors( 'edit', $user, $this->newTitle ) ); // Convert into a Status object @@ -77,8 +141,9 @@ class MovePage { } $tp = $this->newTitle->getTitleProtection(); - if ( $tp !== false && !$user->isAllowed( $tp['permission'] ) ) { - $status->fatal( 'cantmove-titleprotected' ); + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( $tp !== false && !$permissionManager->userHasRight( $user, $tp['permission'] ) ) { + $status->fatal( 'cantmove-titleprotected' ); } Hooks::run( 'MovePageCheckPermissions', @@ -96,44 +161,41 @@ class MovePage { * @return Status */ public function isValidMove() { - global $wgContentHandlerUseDB; $status = new Status(); if ( $this->oldTitle->equals( $this->newTitle ) ) { $status->fatal( 'selfmove' ); + } elseif ( $this->newTitle->getArticleID() && !$this->isValidMoveTarget() ) { + // The move is allowed only if (1) the target doesn't exist, or (2) the target is a + // redirect to the source, and has no history (so we can undo bad moves right after + // they're done). + $status->fatal( 'articleexists' ); } - if ( !$this->oldTitle->isMovable() ) { + + // @todo If the old title is invalid, maybe we should check if it somehow exists in the + // database and allow moving it to a valid name? Why prohibit the move from an empty name + // without checking in the database? + if ( $this->oldTitle->getDBkey() == '' ) { + $status->fatal( 'badarticleerror' ); + } elseif ( $this->oldTitle->isExternal() ) { + $status->fatal( 'immobile-source-namespace-iw' ); + } elseif ( !$this->oldTitle->isMovable() ) { $status->fatal( 'immobile-source-namespace', $this->oldTitle->getNsText() ); + } elseif ( !$this->oldTitle->exists() ) { + $status->fatal( 'movepage-source-doesnt-exist' ); } + if ( $this->newTitle->isExternal() ) { $status->fatal( 'immobile-target-namespace-iw' ); - } - if ( !$this->newTitle->isMovable() ) { + } elseif ( !$this->newTitle->isMovable() ) { $status->fatal( 'immobile-target-namespace', $this->newTitle->getNsText() ); } - - $oldid = $this->oldTitle->getArticleID(); - - if ( $this->newTitle->getDBkey() === '' ) { - $status->fatal( 'articleexists' ); - } - if ( - ( $this->oldTitle->getDBkey() == '' ) || - ( !$oldid ) || - ( $this->newTitle->getDBkey() == '' ) - ) { - $status->fatal( 'badarticleerror' ); - } - - # The move is allowed only if (1) the target doesn't exist, or - # (2) the target is a redirect to the source, and has no history - # (so we can undo bad moves right after they're done). - if ( $this->newTitle->getArticleID() && !$this->isValidMoveTarget() ) { - $status->fatal( 'articleexists' ); + if ( !$this->newTitle->isValid() ) { + $status->fatal( 'movepage-invalid-target-title' ); } // Content model checks - if ( !$wgContentHandlerUseDB && + if ( !$this->options->get( 'ContentHandlerUseDB' ) && $this->oldTitle->getContentModel() !== $this->newTitle->getContentModel() ) { // can't move a page if that would change the page's content model $status->fatal( @@ -174,7 +236,14 @@ class MovePage { */ protected function isValidFileMove() { $status = new Status(); - $file = wfLocalFile( $this->oldTitle ); + + if ( !$this->newTitle->inNamespace( NS_FILE ) ) { + $status->fatal( 'imagenocrossnamespace' ); + // No need for further errors about the target filename being wrong + return $status; + } + + $file = $this->repoGroup->getLocalRepo()->newFile( $this->oldTitle ); $file->load( File::READ_LATEST ); if ( $file->exists() ) { if ( $this->newTitle->getText() != wfStripIllegalFilenameChars( $this->newTitle->getText() ) ) { @@ -185,10 +254,6 @@ class MovePage { } } - if ( !$this->newTitle->inNamespace( NS_FILE ) ) { - $status->fatal( 'imagenocrossnamespace' ); - } - return $status; } @@ -202,7 +267,7 @@ class MovePage { protected function isValidMoveTarget() { # Is it an existing file? if ( $this->newTitle->inNamespace( NS_FILE ) ) { - $file = wfLocalFile( $this->newTitle ); + $file = $this->repoGroup->getLocalRepo()->newFile( $this->newTitle ); $file->load( File::READ_LATEST ); if ( $file->exists() ) { wfDebug( __METHOD__ . ": file exists\n" ); @@ -287,7 +352,8 @@ class MovePage { } // Check suppressredirect permission - if ( !$user->isAllowed( 'suppressredirect' ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( !$permissionManager->userHasRight( $user, 'suppressredirect' ) ) { $createRedirect = true; } @@ -430,8 +496,6 @@ class MovePage { * @return Status */ private function moveUnsafe( User $user, $reason, $createRedirect, array $changeTags ) { - global $wgCategoryCollation; - $status = Status::newGood(); Hooks::run( 'TitleMove', [ $this->oldTitle, $this->newTitle, $user, $reason, &$status ] ); if ( !$status->isOK() ) { @@ -439,7 +503,7 @@ class MovePage { return $status; } - $dbw = wfGetDB( DB_MASTER ); + $dbw = $this->loadBalancer->getConnection( DB_MASTER ); $dbw->startAtomic( __METHOD__, IDatabase::ATOMIC_CANCELABLE ); Hooks::run( 'TitleMoveStarting', [ $this->oldTitle, $this->newTitle, $user ] ); @@ -461,9 +525,7 @@ class MovePage { [ 'cl_from' => $pageid ], __METHOD__ ); - $services = MediaWikiServices::getInstance(); - $type = $services->getNamespaceInfo()-> - getCategoryLinkType( $this->newTitle->getNamespace() ); + $type = $this->nsInfo->getCategoryLinkType( $this->newTitle->getNamespace() ); foreach ( $prefixes as $prefixRow ) { $prefix = $prefixRow->cl_sortkey_prefix; $catTo = $prefixRow->cl_to; @@ -471,7 +533,7 @@ class MovePage { [ 'cl_sortkey' => Collation::singleton()->getSortKey( $this->newTitle->getCategorySortkey( $prefix ) ), - 'cl_collation' => $wgCategoryCollation, + 'cl_collation' => $this->options->get( 'CategoryCollation' ), 'cl_type' => $type, 'cl_timestamp=cl_timestamp' ], [ @@ -563,13 +625,10 @@ class MovePage { # Update watchlists $oldtitle = $this->oldTitle->getDBkey(); $newtitle = $this->newTitle->getDBkey(); - $oldsnamespace = $services->getNamespaceInfo()-> - getSubject( $this->oldTitle->getNamespace() ); - $newsnamespace = $services->getNamespaceInfo()-> - getSubject( $this->newTitle->getNamespace() ); + $oldsnamespace = $this->nsInfo->getSubject( $this->oldTitle->getNamespace() ); + $newsnamespace = $this->nsInfo->getSubject( $this->newTitle->getNamespace() ); if ( $oldsnamespace != $newsnamespace || $oldtitle != $newtitle ) { - $services->getWatchedItemStore()->duplicateAllAssociatedEntries( - $this->oldTitle, $this->newTitle ); + $this->watchedItems->duplicateAllAssociatedEntries( $this->oldTitle, $this->newTitle ); } // If it is a file then move it last. @@ -630,15 +689,15 @@ class MovePage { $oldTitle->getPrefixedText() ); - $file = wfLocalFile( $oldTitle ); + $file = $this->repoGroup->getLocalRepo()->newFile( $oldTitle ); $file->load( File::READ_LATEST ); if ( $file->exists() ) { $status = $file->move( $newTitle ); } // Clear RepoGroup process cache - RepoGroup::singleton()->clearCache( $oldTitle ); - RepoGroup::singleton()->clearCache( $newTitle ); # clear false negative cache + $this->repoGroup->clearCache( $oldTitle ); + $this->repoGroup->clearCache( $newTitle ); # clear false negative cache return $status; } @@ -739,7 +798,7 @@ class MovePage { $comment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $reason; } - $dbw = wfGetDB( DB_MASTER ); + $dbw = $this->loadBalancer->getConnection( DB_MASTER ); $oldpage = WikiPage::factory( $this->oldTitle ); $oldcountable = $oldpage->isCountable(); diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b7341e3b7a..3f2dcf7f4b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1661,6 +1661,16 @@ class OutputPage extends ContextSource { return $this->mRevisionId; } + /** + * Whether the revision displayed is the latest revision of the page + * + * @since 1.34 + * @return bool + */ + public function isRevisionCurrent() { + return $this->mRevisionId == 0 || $this->mRevisionId == $this->getTitle()->getLatestRevID(); + } + /** * Set the timestamp of the revision which will be displayed. This is used * to avoid a extra DB call in Skin::lastModified(). @@ -2666,6 +2676,8 @@ class OutputPage extends ContextSource { * @param string|null $action Action that was denied or null if unknown */ public function showPermissionsErrorPage( array $errors, $action = null ) { + $services = MediaWikiServices::getInstance(); + $permissionManager = $services->getPermissionManager(); foreach ( $errors as $key => $error ) { $errors[$key] = (array)$error; } @@ -2675,11 +2687,12 @@ class OutputPage extends ContextSource { // 1. the user is not logged in // 2. the only error is insufficient permissions (i.e. no block or something else) // 3. the error can be avoided simply by logging in + if ( in_array( $action, [ 'read', 'edit', 'createpage', 'createtalk', 'upload' ] ) && $this->getUser()->isAnon() && count( $errors ) == 1 && isset( $errors[0][0] ) && ( $errors[0][0] == 'badaccess-groups' || $errors[0][0] == 'badaccess-group0' ) - && ( User::groupHasPermission( 'user', $action ) - || User::groupHasPermission( 'autoconfirmed', $action ) ) + && ( $permissionManager->groupHasPermission( 'user', $action ) + || $permissionManager->groupHasPermission( 'autoconfirmed', $action ) ) ) { $displayReturnto = null; @@ -2715,8 +2728,6 @@ class OutputPage extends ContextSource { } } - $services = MediaWikiServices::getInstance(); - $title = SpecialPage::getTitleFor( 'Userlogin' ); $linkRenderer = $services->getLinkRenderer(); $loginUrl = $title->getLinkURL( $query, false, PROTO_RELATIVE ); @@ -2730,8 +2741,6 @@ class OutputPage extends ContextSource { $this->prepareErrorPage( $this->msg( 'loginreqtitle' ) ); $this->addHTML( $this->msg( $msg )->rawParams( $loginLink )->params( $loginUrl )->parse() ); - $permissionManager = $services->getPermissionManager(); - # Don't return to a page the user can't read otherwise # we'll end up in a pointless loop if ( $displayReturnto && $permissionManager->userCan( diff --git a/includes/Permissions/PermissionManager.php b/includes/Permissions/PermissionManager.php index a04b29cb34..ec0157b20e 100644 --- a/includes/Permissions/PermissionManager.php +++ b/includes/Permissions/PermissionManager.php @@ -22,6 +22,7 @@ namespace MediaWiki\Permissions; use Action; use Exception; use Hooks; +use MediaWiki\Config\ServiceOptions; use MediaWiki\Linker\LinkTarget; use MediaWiki\Revision\RevisionLookup; use MediaWiki\Revision\RevisionRecord; @@ -54,36 +55,36 @@ class PermissionManager { /** @var string Does cheap and expensive checks, using the master as needed */ const RIGOR_SECURE = 'secure'; + /** + * TODO Make this const when HHVM support is dropped (T192166) + * + * @since 1.34 + * @var array + */ + public static $constructorOptions = [ + 'WhitelistRead', + 'WhitelistReadRegexp', + 'EmailConfirmToEdit', + 'BlockDisablesLogin', + 'GroupPermissions', + 'RevokePermissions', + 'AvailableRights', + 'NamespaceProtection', + 'RestrictionLevels' + ]; + + /** @var ServiceOptions */ + private $options; + /** @var SpecialPageFactory */ private $specialPageFactory; /** @var RevisionLookup */ private $revisionLookup; - /** @var string[] List of pages names anonymous user may see */ - private $whitelistRead; - - /** @var string[] Whitelists publicly readable titles with regular expressions */ - private $whitelistReadRegexp; - - /** @var bool Require users to confirm email address before they can edit */ - private $emailConfirmToEdit; - - /** @var bool If set to true, blocked users will no longer be allowed to log in */ - private $blockDisablesLogin; - /** @var NamespaceInfo */ private $nsInfo; - /** @var string[][] Access rights for groups and users in these groups */ - private $groupPermissions; - - /** @var string[][] Permission keys revoked from users in each group */ - private $revokePermissions; - - /** @var string[] A list of available rights, in addition to the ones defined by the core */ - private $availableRights; - /** @var string[] Cached results of getAllRights() */ private $allRights = false; @@ -189,38 +190,21 @@ class PermissionManager { ]; /** + * @param ServiceOptions $options * @param SpecialPageFactory $specialPageFactory * @param RevisionLookup $revisionLookup - * @param string[] $whitelistRead - * @param string[] $whitelistReadRegexp - * @param bool $emailConfirmToEdit - * @param bool $blockDisablesLogin - * @param string[][] $groupPermissions - * @param string[][] $revokePermissions - * @param string[] $availableRights * @param NamespaceInfo $nsInfo */ public function __construct( + ServiceOptions $options, SpecialPageFactory $specialPageFactory, RevisionLookup $revisionLookup, - $whitelistRead, - $whitelistReadRegexp, - $emailConfirmToEdit, - $blockDisablesLogin, - $groupPermissions, - $revokePermissions, - $availableRights, NamespaceInfo $nsInfo ) { + $options->assertRequiredOptions( self::$constructorOptions ); + $this->options = $options; $this->specialPageFactory = $specialPageFactory; $this->revisionLookup = $revisionLookup; - $this->whitelistRead = $whitelistRead; - $this->whitelistReadRegexp = $whitelistReadRegexp; - $this->emailConfirmToEdit = $emailConfirmToEdit; - $this->blockDisablesLogin = $blockDisablesLogin; - $this->groupPermissions = $groupPermissions; - $this->revokePermissions = $revokePermissions; - $this->availableRights = $availableRights; $this->nsInfo = $nsInfo; } @@ -289,7 +273,8 @@ class PermissionManager { } /** - * Check if user is blocked from editing a particular article + * Check if user is blocked from editing a particular article. If the user does not + * have a block, this will return false. * * @param User $user * @param LinkTarget $page Title to check @@ -298,28 +283,30 @@ class PermissionManager { * @return bool */ public function isBlockedFrom( User $user, LinkTarget $page, $fromReplica = false ) { - $blocked = $user->isHidden(); + $block = $user->getBlock( $fromReplica ); + if ( !$block ) { + return false; + } // TODO: remove upon further migration to LinkTarget - $page = Title::newFromLinkTarget( $page ); + $title = Title::newFromLinkTarget( $page ); + $blocked = $user->isHidden(); if ( !$blocked ) { - $block = $user->getBlock( $fromReplica ); - if ( $block ) { - // Special handling for a user's own talk page. The block is not aware - // of the user, so this must be done here. - if ( $page->equals( $user->getTalkPage() ) ) { - $blocked = $block->appliesToUsertalk( $page ); - } else { - $blocked = $block->appliesToTitle( $page ); - } + // Special handling for a user's own talk page. The block is not aware + // of the user, so this must be done here. + if ( $title->equals( $user->getTalkPage() ) ) { + $blocked = $block->appliesToUsertalk( $title ); + } else { + $blocked = $block->appliesToTitle( $title ); } } // only for the purpose of the hook. We really don't need this here. $allowUsertalk = $user->isAllowUsertalk(); - Hooks::run( 'UserIsBlockedFrom', [ $user, $page, &$blocked, &$allowUsertalk ] ); + // Allow extensions to let a blocked user access a particular page + Hooks::run( 'UserIsBlockedFrom', [ $user, $title, &$blocked, &$allowUsertalk ] ); return $blocked; } @@ -423,21 +410,21 @@ class PermissionManager { LinkTarget $page ) { // TODO: remove when LinkTarget usage will expand further - $page = Title::newFromLinkTarget( $page ); + $title = Title::newFromLinkTarget( $page ); // Use getUserPermissionsErrors instead $result = ''; - if ( !Hooks::run( 'userCan', [ &$page, &$user, $action, &$result ] ) ) { + if ( !Hooks::run( 'userCan', [ &$title, &$user, $action, &$result ] ) ) { return $result ? [] : [ [ 'badaccess-group0' ] ]; } // Check getUserPermissionsErrors hook - if ( !Hooks::run( 'getUserPermissionsErrors', [ &$page, &$user, $action, &$result ] ) ) { + if ( !Hooks::run( 'getUserPermissionsErrors', [ &$title, &$user, $action, &$result ] ) ) { $errors = $this->resultToError( $errors, $result ); } // Check getUserPermissionsErrorsExpensive hook if ( $rigor !== self::RIGOR_QUICK && !( $short && count( $errors ) > 0 ) - && !Hooks::run( 'getUserPermissionsErrorsExpensive', [ &$page, &$user, $action, &$result ] ) + && !Hooks::run( 'getUserPermissionsErrorsExpensive', [ &$title, &$user, $action, &$result ] ) ) { $errors = $this->resultToError( $errors, $result ); } @@ -498,57 +485,59 @@ class PermissionManager { LinkTarget $page ) { // TODO: remove when LinkTarget usage will expand further - $page = Title::newFromLinkTarget( $page ); + $title = Title::newFromLinkTarget( $page ); + $whiteListRead = $this->options->get( 'WhitelistRead' ); $whitelisted = false; - if ( User::isEveryoneAllowed( 'read' ) ) { + if ( $this->isEveryoneAllowed( 'read' ) ) { # Shortcut for public wikis, allows skipping quite a bit of code $whitelisted = true; - } elseif ( $user->isAllowed( 'read' ) ) { + } elseif ( $this->userHasRight( $user, 'read' ) ) { # If the user is allowed to read pages, he is allowed to read all pages $whitelisted = true; - } elseif ( $this->isSameSpecialPage( 'Userlogin', $page ) - || $this->isSameSpecialPage( 'PasswordReset', $page ) - || $this->isSameSpecialPage( 'Userlogout', $page ) + } elseif ( $this->isSameSpecialPage( 'Userlogin', $title ) + || $this->isSameSpecialPage( 'PasswordReset', $title ) + || $this->isSameSpecialPage( 'Userlogout', $title ) ) { # Always grant access to the login page. # Even anons need to be able to log in. $whitelisted = true; - } elseif ( is_array( $this->whitelistRead ) && count( $this->whitelistRead ) ) { + } elseif ( is_array( $whiteListRead ) && count( $whiteListRead ) ) { # Time to check the whitelist # Only do these checks is there's something to check against - $name = $page->getPrefixedText(); - $dbName = $page->getPrefixedDBkey(); + $name = $title->getPrefixedText(); + $dbName = $title->getPrefixedDBkey(); // Check for explicit whitelisting with and without underscores - if ( in_array( $name, $this->whitelistRead, true ) - || in_array( $dbName, $this->whitelistRead, true ) ) { + if ( in_array( $name, $whiteListRead, true ) + || in_array( $dbName, $whiteListRead, true ) ) { $whitelisted = true; - } elseif ( $page->getNamespace() == NS_MAIN ) { + } elseif ( $title->getNamespace() == NS_MAIN ) { # Old settings might have the title prefixed with # a colon for main-namespace pages - if ( in_array( ':' . $name, $this->whitelistRead ) ) { + if ( in_array( ':' . $name, $whiteListRead ) ) { $whitelisted = true; } - } elseif ( $page->isSpecialPage() ) { + } elseif ( $title->isSpecialPage() ) { # If it's a special page, ditch the subpage bit and check again - $name = $page->getDBkey(); + $name = $title->getDBkey(); list( $name, /* $subpage */ ) = $this->specialPageFactory->resolveAlias( $name ); if ( $name ) { $pure = SpecialPage::getTitleFor( $name )->getPrefixedText(); - if ( in_array( $pure, $this->whitelistRead, true ) ) { + if ( in_array( $pure, $whiteListRead, true ) ) { $whitelisted = true; } } } } - if ( !$whitelisted && is_array( $this->whitelistReadRegexp ) - && !empty( $this->whitelistReadRegexp ) ) { - $name = $page->getPrefixedText(); + $whitelistReadRegexp = $this->options->get( 'WhitelistReadRegexp' ); + if ( !$whitelisted && is_array( $whitelistReadRegexp ) + && !empty( $whitelistReadRegexp ) ) { + $name = $title->getPrefixedText(); // Check for regex whitelisting - foreach ( $this->whitelistReadRegexp as $listItem ) { + foreach ( $whitelistReadRegexp as $listItem ) { if ( preg_match( $listItem, $name ) ) { $whitelisted = true; break; @@ -558,7 +547,7 @@ class PermissionManager { if ( !$whitelisted ) { # If the title is not whitelisted, give extensions a chance to do so... - Hooks::run( 'TitleReadWhitelist', [ $page, $user, &$whitelisted ] ); + Hooks::run( 'TitleReadWhitelist', [ $title, $user, &$whitelisted ] ); if ( !$whitelisted ) { $errors[] = $this->missingPermissionError( $action, $short ); } @@ -636,11 +625,11 @@ class PermissionManager { } // Optimize for a very common case - if ( $action === 'read' && !$this->blockDisablesLogin ) { + if ( $action === 'read' && !$this->options->get( 'BlockDisablesLogin' ) ) { return $errors; } - if ( $this->emailConfirmToEdit + if ( $this->options->get( 'EmailConfirmToEdit' ) && !$user->isEmailConfirmed() && $action === 'edit' ) { @@ -715,47 +704,49 @@ class PermissionManager { LinkTarget $page ) { // TODO: remove when LinkTarget usage will expand further - $page = Title::newFromLinkTarget( $page ); + $title = Title::newFromLinkTarget( $page ); if ( !Hooks::run( 'TitleQuickPermissions', - [ $page, $user, $action, &$errors, ( $rigor !== self::RIGOR_QUICK ), $short ] ) + [ $title, $user, $action, &$errors, ( $rigor !== self::RIGOR_QUICK ), $short ] ) ) { return $errors; } - $isSubPage = $this->nsInfo->hasSubpages( $page->getNamespace() ) ? - strpos( $page->getText(), '/' ) !== false : false; + $isSubPage = $this->nsInfo->hasSubpages( $title->getNamespace() ) ? + strpos( $title->getText(), '/' ) !== false : false; if ( $action == 'create' ) { if ( - ( $this->nsInfo->isTalk( $page->getNamespace() ) && - !$user->isAllowed( 'createtalk' ) ) || - ( !$this->nsInfo->isTalk( $page->getNamespace() ) && - !$user->isAllowed( 'createpage' ) ) + ( $this->nsInfo->isTalk( $title->getNamespace() ) && + !$this->userHasRight( $user, 'createtalk' ) ) || + ( !$this->nsInfo->isTalk( $title->getNamespace() ) && + !$this->userHasRight( $user, 'createpage' ) ) ) { $errors[] = $user->isAnon() ? [ 'nocreatetext' ] : [ 'nocreate-loggedin' ]; } } elseif ( $action == 'move' ) { - if ( !$user->isAllowed( 'move-rootuserpages' ) - && $page->getNamespace() == NS_USER && !$isSubPage ) { + if ( !$this->userHasRight( $user, 'move-rootuserpages' ) + && $title->getNamespace() == NS_USER && !$isSubPage ) { // Show user page-specific message only if the user can move other pages $errors[] = [ 'cant-move-user-page' ]; } // Check if user is allowed to move files if it's a file - if ( $page->getNamespace() == NS_FILE && !$user->isAllowed( 'movefile' ) ) { + if ( $title->getNamespace() == NS_FILE && + !$this->userHasRight( $user, 'movefile' ) ) { $errors[] = [ 'movenotallowedfile' ]; } // Check if user is allowed to move category pages if it's a category page - if ( $page->getNamespace() == NS_CATEGORY && !$user->isAllowed( 'move-categorypages' ) ) { + if ( $title->getNamespace() == NS_CATEGORY && + !$this->userHasRight( $user, 'move-categorypages' ) ) { $errors[] = [ 'cant-move-category-page' ]; } - if ( !$user->isAllowed( 'move' ) ) { + if ( !$this->userHasRight( $user, 'move' ) ) { // User can't move anything - $userCanMove = User::groupHasPermission( 'user', 'move' ); - $autoconfirmedCanMove = User::groupHasPermission( 'autoconfirmed', 'move' ); + $userCanMove = $this->groupHasPermission( 'user', 'move' ); + $autoconfirmedCanMove = $this->groupHasPermission( 'autoconfirmed', 'move' ); if ( $user->isAnon() && ( $userCanMove || $autoconfirmedCanMove ) ) { // custom message if logged-in users without any special rights can move $errors[] = [ 'movenologintext' ]; @@ -764,19 +755,19 @@ class PermissionManager { } } } elseif ( $action == 'move-target' ) { - if ( !$user->isAllowed( 'move' ) ) { + if ( !$this->userHasRight( $user, 'move' ) ) { // User can't move anything $errors[] = [ 'movenotallowed' ]; - } elseif ( !$user->isAllowed( 'move-rootuserpages' ) - && $page->getNamespace() == NS_USER && !$isSubPage ) { + } elseif ( !$this->userHasRight( $user, 'move-rootuserpages' ) + && $title->getNamespace() == NS_USER && !$isSubPage ) { // Show user page-specific message only if the user can move other pages $errors[] = [ 'cant-move-to-user-page' ]; - } elseif ( !$user->isAllowed( 'move-categorypages' ) - && $page->getNamespace() == NS_CATEGORY ) { + } elseif ( !$this->userHasRight( $user, 'move-categorypages' ) + && $title->getNamespace() == NS_CATEGORY ) { // Show category page-specific message only if the user can move other pages $errors[] = [ 'cant-move-to-category-page' ]; } - } elseif ( !$user->isAllowed( $action ) ) { + } elseif ( !$this->userHasRight( $user, $action ) ) { $errors[] = $this->missingPermissionError( $action, $short ); } @@ -810,8 +801,8 @@ class PermissionManager { LinkTarget $page ) { // TODO: remove & rework upon further use of LinkTarget - $page = Title::newFromLinkTarget( $page ); - foreach ( $page->getRestrictions( $action ) as $right ) { + $title = Title::newFromLinkTarget( $page ); + foreach ( $title->getRestrictions( $action ) as $right ) { // Backwards compatibility, rewrite sysop -> editprotected if ( $right == 'sysop' ) { $right = 'editprotected'; @@ -823,9 +814,10 @@ class PermissionManager { if ( $right == '' ) { continue; } - if ( !$user->isAllowed( $right ) ) { + if ( !$this->userHasRight( $user, $right ) ) { $errors[] = [ 'protectedpagetext', $right, $action ]; - } elseif ( $page->areRestrictionsCascading() && !$user->isAllowed( 'protect' ) ) { + } elseif ( $title->areRestrictionsCascading() && + !$this->userHasRight( $user, 'protect' ) ) { $errors[] = [ 'protectedpagetext', 'protect', $action ]; } } @@ -837,7 +829,7 @@ class PermissionManager { * Check restrictions on cascading pages. * * @param string $action The action to check - * @param User $user User to check + * @param UserIdentity $user User to check * @param array $errors List of current errors * @param string $rigor One of PermissionManager::RIGOR_ constants * - RIGOR_QUICK : does cheap permission checks from replica DBs (usable for GUI creation) @@ -851,21 +843,21 @@ class PermissionManager { */ private function checkCascadingSourcesRestrictions( $action, - User $user, + UserIdentity $user, $errors, $rigor, $short, LinkTarget $page ) { // TODO: remove & rework upon further use of LinkTarget - $page = Title::newFromLinkTarget( $page ); - if ( $rigor !== self::RIGOR_QUICK && !$page->isUserConfigPage() ) { + $title = Title::newFromLinkTarget( $page ); + if ( $rigor !== self::RIGOR_QUICK && !$title->isUserConfigPage() ) { # We /could/ use the protection level on the source page, but it's # fairly ugly as we have to establish a precedence hierarchy for pages # included by multiple cascade-protected pages. So just restrict # it to people with 'protect' permission, as they could remove the # protection anyway. - list( $cascadingSources, $restrictions ) = $page->getCascadeProtectionSources(); + list( $cascadingSources, $restrictions ) = $title->getCascadeProtectionSources(); # Cascading protection depends on more than this page... # Several cascading protected pages may include this page... # Check each cascading level @@ -880,7 +872,7 @@ class PermissionManager { if ( $right == 'autoconfirmed' ) { $right = 'editsemiprotected'; } - if ( $right != '' && !$user->isAllowedAll( 'protect', $right ) ) { + if ( $right != '' && !$this->userHasAllRights( $user, 'protect', $right ) ) { $wikiPages = ''; /** @var Title $wikiPage */ foreach ( $cascadingSources as $wikiPage ) { @@ -922,18 +914,18 @@ class PermissionManager { global $wgDeleteRevisionsLimit, $wgLang; // TODO: remove & rework upon further use of LinkTarget - $page = Title::newFromLinkTarget( $page ); + $title = Title::newFromLinkTarget( $page ); if ( $action == 'protect' ) { - if ( count( $this->getPermissionErrorsInternal( 'edit', $user, $page, $rigor, true ) ) ) { + if ( count( $this->getPermissionErrorsInternal( 'edit', $user, $title, $rigor, true ) ) ) { // If they can't edit, they shouldn't protect. $errors[] = [ 'protect-cantedit' ]; } } elseif ( $action == 'create' ) { - $title_protection = $page->getTitleProtection(); + $title_protection = $title->getTitleProtection(); if ( $title_protection ) { if ( $title_protection['permission'] == '' - || !$user->isAllowed( $title_protection['permission'] ) + || !$this->userHasRight( $user, $title_protection['permission'] ) ) { $errors[] = [ 'titleprotected', @@ -945,41 +937,41 @@ class PermissionManager { } } elseif ( $action == 'move' ) { // Check for immobile pages - if ( !$this->nsInfo->isMovable( $page->getNamespace() ) ) { + if ( !$this->nsInfo->isMovable( $title->getNamespace() ) ) { // Specific message for this case - $errors[] = [ 'immobile-source-namespace', $page->getNsText() ]; - } elseif ( !$page->isMovable() ) { + $errors[] = [ 'immobile-source-namespace', $title->getNsText() ]; + } elseif ( !$title->isMovable() ) { // Less specific message for rarer cases $errors[] = [ 'immobile-source-page' ]; } } elseif ( $action == 'move-target' ) { - if ( !$this->nsInfo->isMovable( $page->getNamespace() ) ) { - $errors[] = [ 'immobile-target-namespace', $page->getNsText() ]; - } elseif ( !$page->isMovable() ) { + if ( !$this->nsInfo->isMovable( $title->getNamespace() ) ) { + $errors[] = [ 'immobile-target-namespace', $title->getNsText() ]; + } elseif ( !$title->isMovable() ) { $errors[] = [ 'immobile-target-page' ]; } } elseif ( $action == 'delete' ) { - $tempErrors = $this->checkPageRestrictions( 'edit', $user, [], $rigor, true, $page ); + $tempErrors = $this->checkPageRestrictions( 'edit', $user, [], $rigor, true, $title ); if ( !$tempErrors ) { $tempErrors = $this->checkCascadingSourcesRestrictions( 'edit', - $user, $tempErrors, $rigor, true, $page ); + $user, $tempErrors, $rigor, true, $title ); } if ( $tempErrors ) { // If protection keeps them from editing, they shouldn't be able to delete. $errors[] = [ 'deleteprotected' ]; } if ( $rigor !== self::RIGOR_QUICK && $wgDeleteRevisionsLimit - && !$this->userCan( 'bigdelete', $user, $page ) && $page->isBigDeletion() + && !$this->userCan( 'bigdelete', $user, $title ) && $title->isBigDeletion() ) { $errors[] = [ 'delete-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ]; } } elseif ( $action === 'undelete' ) { - if ( count( $this->getPermissionErrorsInternal( 'edit', $user, $page, $rigor, true ) ) ) { + if ( count( $this->getPermissionErrorsInternal( 'edit', $user, $title, $rigor, true ) ) ) { // Undeleting implies editing $errors[] = [ 'undelete-cantedit' ]; } - if ( !$page->exists() - && count( $this->getPermissionErrorsInternal( 'create', $user, $page, $rigor, true ) ) + if ( !$title->exists() + && count( $this->getPermissionErrorsInternal( 'create', $user, $title, $rigor, true ) ) ) { // Undeleting where nothing currently exists implies creating $errors[] = [ 'undelete-cantcreate' ]; @@ -1013,19 +1005,19 @@ class PermissionManager { LinkTarget $page ) { // TODO: remove & rework upon further use of LinkTarget - $page = Title::newFromLinkTarget( $page ); + $title = Title::newFromLinkTarget( $page ); # Only 'createaccount' can be performed on special pages, # which don't actually exist in the DB. - if ( $page->getNamespace() == NS_SPECIAL && $action !== 'createaccount' ) { + if ( $title->getNamespace() == NS_SPECIAL && $action !== 'createaccount' ) { $errors[] = [ 'ns-specialprotected' ]; } # Check $wgNamespaceProtection for restricted namespaces - if ( $page->isNamespaceProtected( $user ) ) { - $ns = $page->getNamespace() == NS_MAIN ? - wfMessage( 'nstab-main' )->text() : $page->getNsText(); - $errors[] = $page->getNamespace() == NS_MEDIAWIKI ? + if ( $title->isNamespaceProtected( $user ) ) { + $ns = $title->getNamespace() == NS_MAIN ? + wfMessage( 'nstab-main' )->text() : $title->getNsText(); + $errors[] = $title->getNamespace() == NS_MEDIAWIKI ? [ 'protectedinterface', $action ] : [ 'namespaceprotected', $ns, $action ]; } @@ -1057,29 +1049,29 @@ class PermissionManager { LinkTarget $page ) { // TODO: remove & rework upon further use of LinkTarget - $page = Title::newFromLinkTarget( $page ); + $title = Title::newFromLinkTarget( $page ); if ( $action != 'patrol' ) { $error = null; // Sitewide CSS/JSON/JS changes, like all NS_MEDIAWIKI changes, also require the // editinterface right. That's implemented as a restriction so no check needed here. - if ( $page->isSiteCssConfigPage() && !$user->isAllowed( 'editsitecss' ) ) { + if ( $title->isSiteCssConfigPage() && !$this->userHasRight( $user, 'editsitecss' ) ) { $error = [ 'sitecssprotected', $action ]; - } elseif ( $page->isSiteJsonConfigPage() && !$user->isAllowed( 'editsitejson' ) ) { + } elseif ( $title->isSiteJsonConfigPage() && !$this->userHasRight( $user, 'editsitejson' ) ) { $error = [ 'sitejsonprotected', $action ]; - } elseif ( $page->isSiteJsConfigPage() && !$user->isAllowed( 'editsitejs' ) ) { + } elseif ( $title->isSiteJsConfigPage() && !$this->userHasRight( $user, 'editsitejs' ) ) { $error = [ 'sitejsprotected', $action ]; - } elseif ( $page->isRawHtmlMessage() ) { + } elseif ( $title->isRawHtmlMessage() ) { // Raw HTML can be used to deploy CSS or JS so require rights for both. - if ( !$user->isAllowed( 'editsitejs' ) ) { + if ( !$this->userHasRight( $user, 'editsitejs' ) ) { $error = [ 'sitejsprotected', $action ]; - } elseif ( !$user->isAllowed( 'editsitecss' ) ) { + } elseif ( !$this->userHasRight( $user, 'editsitecss' ) ) { $error = [ 'sitecssprotected', $action ]; } } if ( $error ) { - if ( $user->isAllowed( 'editinterface' ) ) { + if ( $this->userHasRight( $user, 'editinterface' ) ) { // Most users / site admins will probably find out about the new, more restrictive // permissions by failing to edit something. Give them more info. // TODO remove this a few release cycles after 1.32 @@ -1096,7 +1088,7 @@ class PermissionManager { * Check CSS/JSON/JS sub-page permissions * * @param string $action The action to check - * @param User $user User to check + * @param UserIdentity $user User to check * @param array $errors List of current errors * @param string $rigor One of PermissionManager::RIGOR_ constants * - RIGOR_QUICK : does cheap permission checks from replica DBs (usable for GUI creation) @@ -1110,14 +1102,14 @@ class PermissionManager { */ private function checkUserConfigPermissions( $action, - User $user, + UserIdentity $user, $errors, $rigor, $short, LinkTarget $page ) { // TODO: remove & rework upon further use of LinkTarget - $page = Title::newFromLinkTarget( $page ); + $title = Title::newFromLinkTarget( $page ); # Protect css/json/js subpages of user pages # XXX: this might be better using restrictions @@ -1126,29 +1118,29 @@ class PermissionManager { return $errors; } - if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $page->getText() ) ) { + if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $title->getText() ) ) { // Users need editmyuser* to edit their own CSS/JSON/JS subpages. if ( - $page->isUserCssConfigPage() - && !$user->isAllowedAny( 'editmyusercss', 'editusercss' ) + $title->isUserCssConfigPage() + && !$this->userHasAnyRight( $user, 'editmyusercss', 'editusercss' ) ) { $errors[] = [ 'mycustomcssprotected', $action ]; } elseif ( - $page->isUserJsonConfigPage() - && !$user->isAllowedAny( 'editmyuserjson', 'edituserjson' ) + $title->isUserJsonConfigPage() + && !$this->userHasAnyRight( $user, 'editmyuserjson', 'edituserjson' ) ) { $errors[] = [ 'mycustomjsonprotected', $action ]; } elseif ( - $page->isUserJsConfigPage() - && !$user->isAllowedAny( 'editmyuserjs', 'edituserjs' ) + $title->isUserJsConfigPage() + && !$this->userHasAnyRight( $user, 'editmyuserjs', 'edituserjs' ) ) { $errors[] = [ 'mycustomjsprotected', $action ]; } elseif ( - $page->isUserJsConfigPage() - && !$user->isAllowedAny( 'edituserjs', 'editmyuserjsredirect' ) + $title->isUserJsConfigPage() + && !$this->userHasAnyRight( $user, 'edituserjs', 'editmyuserjsredirect' ) ) { // T207750 - do not allow users to edit a redirect if they couldn't edit the target - $rev = $this->revisionLookup->getRevisionByTitle( $page ); + $rev = $this->revisionLookup->getRevisionByTitle( $title ); $content = $rev ? $rev->getContent( 'main', RevisionRecord::RAW ) : null; $target = $content ? $content->getUltimateRedirectTarget() : null; if ( $target && ( @@ -1165,18 +1157,18 @@ class PermissionManager { // and only very highly privileged users could remove it. if ( !in_array( $action, [ 'delete', 'deleterevision', 'suppressrevision' ], true ) ) { if ( - $page->isUserCssConfigPage() - && !$user->isAllowed( 'editusercss' ) + $title->isUserCssConfigPage() + && !$this->userHasRight( $user, 'editusercss' ) ) { $errors[] = [ 'customcssprotected', $action ]; } elseif ( - $page->isUserJsonConfigPage() - && !$user->isAllowed( 'edituserjson' ) + $title->isUserJsonConfigPage() + && !$this->userHasRight( $user, 'edituserjson' ) ) { $errors[] = [ 'customjsonprotected', $action ]; } elseif ( - $page->isUserJsConfigPage() - && !$user->isAllowed( 'edituserjs' ) + $title->isUserJsConfigPage() + && !$this->userHasRight( $user, 'edituserjs' ) ) { $errors[] = [ 'customjsprotected', $action ]; } @@ -1205,6 +1197,42 @@ class PermissionManager { return in_array( $action, $this->getUserPermissions( $user ), true ); } + /** + * Check if user is allowed to make any action + * + * @param UserIdentity $user + * // TODO: HHVM can't create mocks with variable params @param string ...$actions + * @return bool True if user is allowed to perform *any* of the given actions + * @since 1.34 + */ + public function userHasAnyRight( UserIdentity $user ) { + $actions = array_slice( func_get_args(), 1 ); + foreach ( $actions as $action ) { + if ( $this->userHasRight( $user, $action ) ) { + return true; + } + } + return false; + } + + /** + * Check if user is allowed to make all actions + * + * @param UserIdentity $user + * // TODO: HHVM can't create mocks with variable params @param string ...$actions + * @return bool True if user is allowed to perform *all* of the given actions + * @since 1.34 + */ + public function userHasAllRights( UserIdentity $user ) { + $actions = array_slice( func_get_args(), 1 ); + foreach ( $actions as $action ) { + if ( !$this->userHasRight( $user, $action ) ) { + return false; + } + } + return true; + } + /** * Get the permissions this user has. * @@ -1243,7 +1271,7 @@ class PermissionManager { if ( $user->isLoggedIn() && - $this->blockDisablesLogin && + $this->options->get( 'BlockDisablesLogin' ) && $user->getBlock() ) { $anon = new User; @@ -1293,10 +1321,10 @@ class PermissionManager { * @return bool */ public function groupHasPermission( $group, $role ) { - return isset( $this->groupPermissions[$group][$role] ) && - $this->groupPermissions[$group][$role] && - !( isset( $this->revokePermissions[$group][$role] ) && - $this->revokePermissions[$group][$role] ); + $groupPermissions = $this->options->get( 'GroupPermissions' ); + $revokePermissions = $this->options->get( 'RevokePermissions' ); + return isset( $groupPermissions[$group][$role] ) && $groupPermissions[$group][$role] && + !( isset( $revokePermissions[$group][$role] ) && $revokePermissions[$group][$role] ); } /** @@ -1311,17 +1339,17 @@ class PermissionManager { $rights = []; // grant every granted permission first foreach ( $groups as $group ) { - if ( isset( $this->groupPermissions[$group] ) ) { + if ( isset( $this->options->get( 'GroupPermissions' )[$group] ) ) { $rights = array_merge( $rights, // array_filter removes empty items - array_keys( array_filter( $this->groupPermissions[$group] ) ) ); + array_keys( array_filter( $this->options->get( 'GroupPermissions' )[$group] ) ) ); } } // now revoke the revoked permissions foreach ( $groups as $group ) { - if ( isset( $this->revokePermissions[$group] ) ) { + if ( isset( $this->options->get( 'RevokePermissions' )[$group] ) ) { $rights = array_diff( $rights, - array_keys( array_filter( $this->revokePermissions[$group] ) ) ); + array_keys( array_filter( $this->options->get( 'RevokePermissions' )[$group] ) ) ); } } return array_unique( $rights ); @@ -1337,7 +1365,7 @@ class PermissionManager { */ public function getGroupsWithPermission( $role ) { $allowedGroups = []; - foreach ( array_keys( $this->groupPermissions ) as $group ) { + foreach ( array_keys( $this->options->get( 'GroupPermissions' ) ) as $group ) { if ( $this->groupHasPermission( $group, $role ) ) { $allowedGroups[] = $group; } @@ -1367,14 +1395,14 @@ class PermissionManager { return $this->cachedRights[$right]; } - if ( !isset( $this->groupPermissions['*'][$right] ) - || !$this->groupPermissions['*'][$right] ) { + if ( !isset( $this->options->get( 'GroupPermissions' )['*'][$right] ) + || !$this->options->get( 'GroupPermissions' )['*'][$right] ) { $this->cachedRights[$right] = false; return false; } // If it's revoked anywhere, then everyone doesn't have it - foreach ( $this->revokePermissions as $rights ) { + foreach ( $this->options->get( 'RevokePermissions' ) as $rights ) { if ( isset( $rights[$right] ) && $rights[$right] ) { $this->cachedRights[$right] = false; return false; @@ -1412,10 +1440,10 @@ class PermissionManager { */ public function getAllPermissions() { if ( $this->allRights === false ) { - if ( count( $this->availableRights ) ) { + if ( count( $this->options->get( 'AvailableRights' ) ) ) { $this->allRights = array_unique( array_merge( $this->coreRights, - $this->availableRights + $this->options->get( 'AvailableRights' ) ) ); } else { $this->allRights = $this->coreRights; @@ -1425,6 +1453,85 @@ class PermissionManager { return $this->allRights; } + /** + * Determine which restriction levels it makes sense to use in a namespace, + * optionally filtered by a user's rights. + * + * @param int $index Index to check + * @param UserIdentity|null $user User to check + * @return array + */ + public function getNamespaceRestrictionLevels( $index, UserIdentity $user = null ) { + if ( !isset( $this->options->get( 'NamespaceProtection' )[$index] ) ) { + // All levels are valid if there's no namespace restriction. + // But still filter by user, if necessary + $levels = $this->options->get( 'RestrictionLevels' ); + if ( $user ) { + $levels = array_values( array_filter( $levels, function ( $level ) use ( $user ) { + $right = $level; + if ( $right == 'sysop' ) { + $right = 'editprotected'; // BC + } + if ( $right == 'autoconfirmed' ) { + $right = 'editsemiprotected'; // BC + } + return $this->userHasRight( $user, $right ); + } ) ); + } + return $levels; + } + + // $wgNamespaceProtection can require one or more rights to edit the namespace, which + // may be satisfied by membership in multiple groups each giving a subset of those rights. + // A restriction level is redundant if, for any one of the namespace rights, all groups + // giving that right also give the restriction level's right. Or, conversely, a + // restriction level is not redundant if, for every namespace right, there's at least one + // group giving that right without the restriction level's right. + // + // First, for each right, get a list of groups with that right. + $namespaceRightGroups = []; + foreach ( (array)$this->options->get( 'NamespaceProtection' )[$index] as $right ) { + if ( $right == 'sysop' ) { + $right = 'editprotected'; // BC + } + if ( $right == 'autoconfirmed' ) { + $right = 'editsemiprotected'; // BC + } + if ( $right != '' ) { + $namespaceRightGroups[$right] = $this->getGroupsWithPermission( $right ); + } + } + + // Now, go through the protection levels one by one. + $usableLevels = [ '' ]; + foreach ( $this->options->get( 'RestrictionLevels' ) as $level ) { + $right = $level; + if ( $right == 'sysop' ) { + $right = 'editprotected'; // BC + } + if ( $right == 'autoconfirmed' ) { + $right = 'editsemiprotected'; // BC + } + + if ( $right != '' && + !isset( $namespaceRightGroups[$right] ) && + ( !$user || $this->userHasRight( $user, $right ) ) + ) { + // Do any of the namespace rights imply the restriction right? (see explanation above) + foreach ( $namespaceRightGroups as $groups ) { + if ( !array_diff( $groups, $this->getGroupsWithPermission( $right ) ) ) { + // Yes, this one does. + continue 2; + } + } + // No, keep the restriction level + $usableLevels[] = $level; + } + } + + return $usableLevels; + } + /** * Add temporary user rights, only valid for the current scope. * This is meant for making it possible to programatically trigger certain actions that diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 4bead3464c..8b5d9956ab 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -90,7 +90,7 @@ class ProtectionForm { * Loads the current state of protection into the object. */ function loadData() { - $levels = MediaWikiServices::getInstance()->getNamespaceInfo()->getRestrictionLevels( + $levels = MediaWikiServices::getInstance()->getPermissionManager()->getNamespaceRestrictionLevels( $this->mTitle->getNamespace(), $this->mContext->getUser() ); $this->mCascade = $this->mTitle->areRestrictionsCascading(); @@ -180,7 +180,7 @@ class ProtectionForm { */ function execute() { if ( - MediaWikiServices::getInstance()->getNamespaceInfo()->getRestrictionLevels( + MediaWikiServices::getInstance()->getPermissionManager()->getNamespaceRestrictionLevels( $this->mTitle->getNamespace() ) === [ '' ] ) { @@ -553,7 +553,8 @@ class ProtectionForm { } $out .= Xml::closeElement( 'fieldset' ); - if ( $user->isAllowed( 'editinterface' ) ) { + if ( MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'editinterface' ) ) { $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer(); $link = $linkRenderer->makeKnownLink( $context->msg( 'protect-dropdown' )->inContentLanguage()->getTitle(), @@ -585,10 +586,12 @@ class ProtectionForm { function buildSelector( $action, $selected ) { // If the form is disabled, display all relevant levels. Otherwise, // just show the ones this user can use. - $levels = MediaWikiServices::getInstance()->getNamespaceInfo()->getRestrictionLevels( - $this->mTitle->getNamespace(), - $this->disabled ? null : $this->mContext->getUser() - ); + $levels = MediaWikiServices::getInstance() + ->getPermissionManager() + ->getNamespaceRestrictionLevels( + $this->mTitle->getNamespace(), + $this->disabled ? null : $this->mContext->getUser() + ); $id = 'mwProtect-level-' . $action; diff --git a/includes/Rest/EntryPoint.php b/includes/Rest/EntryPoint.php index a14c1a1294..ae01ae46ac 100644 --- a/includes/Rest/EntryPoint.php +++ b/includes/Rest/EntryPoint.php @@ -90,6 +90,9 @@ class EntryPoint { $cookie['options'] ); } + // Clear all errors that might have been displayed if display_errors=On + ob_clean(); + $stream = $response->getBody(); $stream->rewind(); if ( $stream instanceof CopyableStreamInterface ) { diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 9073de1c0e..21a66cde88 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -39,17 +39,21 @@ use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface; use MediaWiki\Auth\AuthManager; +use MediaWiki\BadFileLookup; use MediaWiki\Block\BlockManager; use MediaWiki\Block\BlockRestrictionStore; use MediaWiki\Config\ConfigRepository; use MediaWiki\Config\ServiceOptions; +use MediaWiki\FileBackend\FSFile\TempFSFileFactory; use MediaWiki\Http\HttpRequestFactory; use MediaWiki\Interwiki\ClassicInterwikiLookup; use MediaWiki\Interwiki\InterwikiLookup; +use MediaWiki\Languages\LanguageNameUtils; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkRendererFactory; use MediaWiki\Logger\LoggerFactory; use MediaWiki\MediaWikiServices; +use MediaWiki\Page\MovePageFactory; use MediaWiki\Permissions\PermissionManager; use MediaWiki\Preferences\PreferencesFactory; use MediaWiki\Preferences\DefaultPreferencesFactory; @@ -67,6 +71,7 @@ use MediaWiki\Storage\BlobStoreFactory; use MediaWiki\Storage\NameTableStoreFactory; use MediaWiki\Storage\SqlBlobStore; use MediaWiki\Storage\PageEditStash; +use Wikimedia\ObjectFactory; return [ 'ActorMigration' => function ( MediaWikiServices $services ) : ActorMigration { @@ -75,6 +80,17 @@ return [ ); }, + 'BadFileLookup' => function ( MediaWikiServices $services ) : BadFileLookup { + return new BadFileLookup( + function () { + return wfMessage( 'bad_image_list' )->inContentLanguage()->plain(); + }, + $services->getLocalServerObjectCache(), + $services->getRepoGroup(), + $services->getTitleParser() + ); + }, + 'BlobStore' => function ( MediaWikiServices $services ) : BlobStore { return $services->getService( '_SqlBlobStore' ); }, @@ -97,7 +113,8 @@ return [ BlockManager::$constructorOptions, $services->getMainConfig() ), $context->getUser(), - $context->getRequest() + $context->getRequest(), + $services->getPermissionManager() ); }, @@ -215,7 +232,12 @@ return [ }, 'GenderCache' => function ( MediaWikiServices $services ) : GenderCache { - return new GenderCache( $services->getNamespaceInfo() ); + $nsInfo = $services->getNamespaceInfo(); + // Database layer may be disabled, so processing without database connection + $dbLoadBalancer = $services->isServiceDisabled( 'DBLoadBalancer' ) + ? null + : $services->getDBLoadBalancer(); + return new GenderCache( $nsInfo, $dbLoadBalancer ); }, 'HttpRequestFactory' => @@ -235,6 +257,13 @@ return [ ); }, + 'LanguageNameUtils' => function ( MediaWikiServices $services ) : LanguageNameUtils { + return new LanguageNameUtils( new ServiceOptions( + LanguageNameUtils::$constructorOptions, + $services->getMainConfig() + ) ); + }, + 'LinkCache' => function ( MediaWikiServices $services ) : LinkCache { return new LinkCache( $services->getTitleFormatter(), @@ -261,10 +290,61 @@ return [ ); }, + 'LocalisationCache' => function ( MediaWikiServices $services ) : LocalisationCache { + $conf = $services->getMainConfig()->get( 'LocalisationCacheConf' ); + + $logger = LoggerFactory::getInstance( 'localisation' ); + + // Figure out what class to use for the LCStore + $storeArg = []; + $storeArg['directory'] = + $conf['storeDirectory'] ?? $services->getMainConfig()->get( 'CacheDirectory' ); + + if ( !empty( $conf['storeClass'] ) ) { + $storeClass = $conf['storeClass']; + } elseif ( $conf['store'] === 'files' || $conf['store'] === 'file' || + ( $conf['store'] === 'detect' && $storeArg['directory'] ) + ) { + $storeClass = LCStoreCDB::class; + } elseif ( $conf['store'] === 'db' || $conf['store'] === 'detect' ) { + $storeClass = LCStoreDB::class; + $storeArg['server'] = $conf['storeServer'] ?? []; + } elseif ( $conf['store'] === 'array' ) { + $storeClass = LCStoreStaticArray::class; + } else { + throw new MWException( + 'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.' + ); + } + $logger->debug( "LocalisationCache: using store $storeClass" ); + + return new $conf['class']( + new ServiceOptions( + LocalisationCache::$constructorOptions, + // Two of the options are stored in $wgLocalisationCacheConf + $conf, + // In case someone set that config variable and didn't reset all keys, set defaults. + [ + 'forceRecache' => false, + 'manualRecache' => false, + ], + // Some other options come from config itself + $services->getMainConfig() + ), + new $storeClass( $storeArg ), + $logger, + [ function () use ( $services ) { + $services->getResourceLoader()->getMessageBlobStore()->clear(); + } ], + $services->getLanguageNameUtils() + ); + }, + 'LocalServerObjectCache' => function ( MediaWikiServices $services ) : BagOStuff { + $config = $services->getMainConfig(); $cacheId = \ObjectCache::detectLocalServerCache(); - return \ObjectCache::newFromId( $cacheId ); + return \ObjectCache::newFromParams( $config->get( 'ObjectCaches' )[$cacheId] ); }, 'MagicWordFactory' => function ( MediaWikiServices $services ) : MagicWordFactory { @@ -314,6 +394,20 @@ return [ ); }, + 'MessageCache' => function ( MediaWikiServices $services ) : MessageCache { + $mainConfig = $services->getMainConfig(); + return new MessageCache( + $services->getMainWANObjectCache(), + ObjectCache::getInstance( $mainConfig->get( 'MessageCacheType' ) ), + $mainConfig->get( 'UseLocalMessageCache' ) + ? $services->getLocalServerObjectCache() + : new EmptyBagOStuff(), + $mainConfig->get( 'UseDatabaseMessages' ), + $mainConfig->get( 'MsgCacheExpiry' ), + $services->getContentLanguage() + ); + }, + 'MimeAnalyzer' => function ( MediaWikiServices $services ) : MimeAnalyzer { $logger = LoggerFactory::getInstance( 'Mime' ); $mainConfig = $services->getMainConfig(); @@ -372,6 +466,17 @@ return [ return new MimeAnalyzer( $params ); }, + 'MovePageFactory' => function ( MediaWikiServices $services ) : MovePageFactory { + return new MovePageFactory( + new ServiceOptions( MovePageFactory::$constructorOptions, $services->getMainConfig() ), + $services->getDBLoadBalancer(), + $services->getNamespaceInfo(), + $services->getWatchedItemStore(), + $services->getPermissionManager(), + $services->getRepoGroup() + ); + }, + 'NamespaceInfo' => function ( MediaWikiServices $services ) : NamespaceInfo { return new NamespaceInfo( new ServiceOptions( NamespaceInfo::$constructorOptions, $services->getMainConfig() ) ); @@ -385,6 +490,10 @@ return [ ); }, + 'ObjectFactory' => function ( MediaWikiServices $services ) : ObjectFactory { + return new ObjectFactory( $services ); + }, + 'OldRevisionImporter' => function ( MediaWikiServices $services ) : OldRevisionImporter { return new ImportableOldRevisionImporter( true, @@ -464,17 +573,12 @@ return [ }, 'PermissionManager' => function ( MediaWikiServices $services ) : PermissionManager { - $config = $services->getMainConfig(); return new PermissionManager( + new ServiceOptions( + PermissionManager::$constructorOptions, $services->getMainConfig() + ), $services->getSpecialPageFactory(), $services->getRevisionLookup(), - $config->get( 'WhitelistRead' ), - $config->get( 'WhitelistReadRegexp' ), - $config->get( 'EmailConfirmToEdit' ), - $config->get( 'BlockDisablesLogin' ), - $config->get( 'GroupPermissions' ), - $config->get( 'RevokePermissions' ), - $config->get( 'AvailableRights' ), $services->getNamespaceInfo() ); }, @@ -683,6 +787,10 @@ return [ ); }, + 'TempFSFileFactory' => function ( MediaWikiServices $services ) : TempFSFileFactory { + return new TempFSFileFactory( $services->getMainConfig()->get( 'TmpDirectory' ) ); + }, + 'TitleFormatter' => function ( MediaWikiServices $services ) : TitleFormatter { return $services->getService( '_MediaWikiTitleCodec' ); }, diff --git a/includes/Storage/DerivedPageDataUpdater.php b/includes/Storage/DerivedPageDataUpdater.php index 68814ef3aa..4903cf0095 100644 --- a/includes/Storage/DerivedPageDataUpdater.php +++ b/includes/Storage/DerivedPageDataUpdater.php @@ -659,7 +659,7 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface { $hasLinks = (bool)count( $this->getCanonicalParserOutput()->getLinks() ); } - foreach ( $this->getModifiedSlotRoles() as $role ) { + foreach ( $this->getSlots()->getSlotRoles() as $role ) { $roleHandler = $this->slotRoleRegistry->getRoleHandler( $role ); if ( $roleHandler->supportsArticleCount() ) { $content = $this->getRawContent( $role ); @@ -1208,7 +1208,8 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface { } // "created" is forced here - $this->options['created'] = ( $this->pageState['oldId'] === 0 ); + $this->options['created'] = ( $this->options['created'] || + ( $this->pageState['oldId'] === 0 ) ); $this->revision = $revision; diff --git a/includes/Title.php b/includes/Title.php index 281f75bac1..75ddea8dd4 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2506,8 +2506,9 @@ class Title implements LinkTarget, IDBAccessObject { global $wgNamespaceProtection; if ( isset( $wgNamespaceProtection[$this->mNamespace] ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); foreach ( (array)$wgNamespaceProtection[$this->mNamespace] as $right ) { - if ( $right != '' && !$user->isAllowed( $right ) ) { + if ( !$permissionManager->userHasRight( $user, $right ) ) { return true; } } @@ -3461,7 +3462,7 @@ class Title implements LinkTarget, IDBAccessObject { return [ [ 'badtitletext' ] ]; } - $mp = new MovePage( $this, $nt ); + $mp = MediaWikiServices::getInstance()->getMovePageFactory()->newMovePage( $this, $nt ); $errors = $mp->isValidMove()->getErrorsArray(); if ( $auth ) { $errors = wfMergeErrorArrays( @@ -3493,7 +3494,7 @@ class Title implements LinkTarget, IDBAccessObject { global $wgUser; - $mp = new MovePage( $this, $nt ); + $mp = MediaWikiServices::getInstance()->getMovePageFactory()->newMovePage( $this, $nt ); $method = $auth ? 'moveIfAllowed' : 'move'; $status = $mp->$method( $wgUser, $reason, $createRedirect, $changeTags ); if ( $status->isOK() ) { diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 6593e49d8a..defe07eaee 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -395,18 +395,25 @@ class WebRequest { # https://www.php.net/variables.external#language.variables.external.dot-in-names # Work around PHP *feature* to avoid *bugs* elsewhere. $name = strtr( $name, '.', '_' ); - if ( isset( $arr[$name] ) ) { - $data = $arr[$name]; + + if ( !isset( $arr[$name] ) ) { + return $default; + } + + $data = $arr[$name]; + # Optimisation: Skip UTF-8 normalization and legacy transcoding for simple ASCII strings. + $isAsciiStr = ( is_string( $data ) && preg_match( '/[^\x20-\x7E]/', $data ) === 0 ); + if ( !$isAsciiStr ) { if ( isset( $_GET[$name] ) && is_string( $data ) ) { # Check for alternate/legacy character encoding. - $contLang = MediaWikiServices::getInstance()->getContentLanguage(); - $data = $contLang->checkTitleEncoding( $data ); + $data = MediaWikiServices::getInstance() + ->getContentLanguage() + ->checkTitleEncoding( $data ); } $data = $this->normalizeUnicode( $data ); - return $data; - } else { - return $default; } + + return $data; } /** diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index 958ec06f47..385ccc9607 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -265,7 +265,8 @@ class HistoryAction extends FormlessAction { 'value' => $tagFilter, ] ]; - if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( $permissionManager->userHasRight( $this->getUser(), 'deletedhistory' ) ) { $fields[] = [ 'type' => 'check', 'label' => $this->msg( 'history-show-deleted' )->text(), diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 279c13bd04..15cee948ae 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -345,7 +345,7 @@ class InfoAction extends FormlessAction { $unwatchedPageThreshold = $config->get( 'UnwatchedPageThreshold' ); if ( - $user->isAllowed( 'unwatchedpages' ) || + $services->getPermissionManager()->userHasRight( $user, 'unwatchedpages' ) || ( $unwatchedPageThreshold !== false && $pageCounts['watchers'] >= $unwatchedPageThreshold ) ) { @@ -360,7 +360,7 @@ class InfoAction extends FormlessAction { ) { $minToDisclose = $config->get( 'UnwatchedPageSecret' ); if ( $pageCounts['visitingWatchers'] > $minToDisclose || - $user->isAllowed( 'unwatchedpages' ) ) { + $services->getPermissionManager()->userHasRight( $user, 'unwatchedpages' ) ) { $pageInfo['header-basic'][] = [ $this->msg( 'pageinfo-visiting-watchers' ), $lang->formatNum( $pageCounts['visitingWatchers'] ) diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php index abb8ff5b1f..8fd4e0ad55 100644 --- a/includes/actions/RawAction.php +++ b/includes/actions/RawAction.php @@ -111,7 +111,8 @@ class RawAction extends FormlessAction { $rootPage = strtok( $title->getText(), '/' ); $userFromTitle = User::newFromName( $rootPage, 'usable' ); if ( !$userFromTitle || $userFromTitle->getId() === 0 ) { - $elevated = $this->getUser()->isAllowed( 'editinterface' ); + $elevated = MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $this->getUser(), 'editinterface' ); $elevatedText = $elevated ? 'by elevated ' : ''; $log = LoggerFactory::getInstance( "security" ); $log->warning( diff --git a/includes/actions/WatchAction.php b/includes/actions/WatchAction.php index 0eba613a20..e88654ad2f 100644 --- a/includes/actions/WatchAction.php +++ b/includes/actions/WatchAction.php @@ -20,6 +20,8 @@ * @ingroup Actions */ +use MediaWiki\MediaWikiServices; + /** * Page addition to a user's watchlist * @@ -116,7 +118,8 @@ class WatchAction extends FormAction { User $user, $checkRights = User::CHECK_USER_RIGHTS ) { - if ( $checkRights && !$user->isAllowed( 'editmywatchlist' ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( $checkRights && !$permissionManager->userHasRight( $user, 'editmywatchlist' ) ) { return User::newFatalPermissionDeniedStatus( 'editmywatchlist' ); } @@ -140,7 +143,9 @@ class WatchAction extends FormAction { * @return Status */ public static function doUnwatch( Title $title, User $user ) { - if ( !$user->isAllowed( 'editmywatchlist' ) ) { + if ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $user, 'editmywatchlist' ) ) { return User::newFatalPermissionDeniedStatus( 'editmywatchlist' ); } diff --git a/includes/actions/pagers/HistoryPager.php b/includes/actions/pagers/HistoryPager.php index c5c090d21b..14f76bc37f 100644 --- a/includes/actions/pagers/HistoryPager.php +++ b/includes/actions/pagers/HistoryPager.php @@ -172,6 +172,7 @@ class HistoryPager extends ReverseChronologicalPager { * @return string HTML output */ protected function getStartBody() { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); $this->lastRow = false; $this->counter = 1; $this->oldIdChecked = 0; @@ -197,7 +198,7 @@ class HistoryPager extends ReverseChronologicalPager { $user = $this->getUser(); $actionButtons = ''; - if ( $user->isAllowed( 'deleterevision' ) ) { + if ( $permissionManager->userHasRight( $user, 'deleterevision' ) ) { $actionButtons .= $this->getRevisionButton( 'revisiondelete', 'showhideselectedversions' ); } @@ -210,7 +211,7 @@ class HistoryPager extends ReverseChronologicalPager { 'mw-history-revisionactions' ], $actionButtons ); } - if ( $user->isAllowed( 'deleterevision' ) || $this->showTagEditUI ) { + if ( $permissionManager->userHasRight( $user, 'deleterevision' ) || $this->showTagEditUI ) { $this->buttons .= ( new ListToggle( $this->getOutput() ) )->getHTML(); } @@ -305,6 +306,7 @@ class HistoryPager extends ReverseChronologicalPager { */ function historyLine( $row, $next, $notificationtimestamp = false, $dummy = false, $firstInList = false ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); $rev = new Revision( $row, 0, $this->getTitle() ); if ( is_object( $next ) ) { @@ -332,7 +334,7 @@ class HistoryPager extends ReverseChronologicalPager { $del = ''; $user = $this->getUser(); - $canRevDelete = $user->isAllowed( 'deleterevision' ); + $canRevDelete = $permissionManager->userHasRight( $user, 'deleterevision' ); // Show checkboxes for each revision, to allow for revision deletion and // change tags if ( $canRevDelete || $this->showTagEditUI ) { @@ -349,7 +351,8 @@ class HistoryPager extends ReverseChronologicalPager { [ 'name' => 'ids[' . $rev->getId() . ']' ] ); } // User can only view deleted revisions... - } elseif ( $rev->getVisibility() && $user->isAllowed( 'deletedhistory' ) ) { + } elseif ( $rev->getVisibility() && + $permissionManager->userHasRight( $user, 'deletedhistory' ) ) { // If revision was hidden from sysops, disable the link if ( !$rev->userCan( RevisionRecord::DELETED_RESTRICTED, $user ) ) { $del = Linker::revDeleteLinkDisabled( false ); diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index a7b872ce15..8b6a3e582f 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -2126,7 +2126,9 @@ abstract class ApiBase extends ContextSource { $user = $this->getUser(); } $rights = (array)$rights; - if ( !$user->isAllowedAny( ...$rights ) ) { + if ( !$this->getPermissionManager() + ->userHasAnyRight( $user, ...$rights ) + ) { $this->dieWithError( [ 'apierror-permissiondenied', $this->msg( "action-{$rights[0]}" ) ] ); } } diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index 480126760e..2c1564e085 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -98,7 +98,8 @@ class ApiBlock extends ApiBase { } } - if ( $params['hidename'] && !$user->isAllowed( 'hideuser' ) ) { + if ( $params['hidename'] && + !$this->getPermissionManager()->userHasRight( $user, 'hideuser' ) ) { $this->dieWithError( 'apierror-canthide' ); } if ( $params['noemail'] && !SpecialBlock::canBlockEmail( $user ) ) { diff --git a/includes/api/ApiComparePages.php b/includes/api/ApiComparePages.php index e09691558c..05eb4382b3 100644 --- a/includes/api/ApiComparePages.php +++ b/includes/api/ApiComparePages.php @@ -231,7 +231,9 @@ class ApiComparePages extends ApiBase { */ private function getRevisionById( $id ) { $rev = $this->revisionStore->getRevisionById( $id ); - if ( !$rev && $this->getUser()->isAllowedAny( 'deletedtext', 'undelete' ) ) { + if ( !$rev && $this->getPermissionManager() + ->userHasAnyRight( $this->getUser(), 'deletedtext', 'undelete' ) + ) { // Try the 'archive' table $arQuery = $this->revisionStore->getArchiveQueryInfo(); $row = $this->getDB()->selectRow( diff --git a/includes/api/ApiFeedContributions.php b/includes/api/ApiFeedContributions.php index 08be8e029c..28b0a4b714 100644 --- a/includes/api/ApiFeedContributions.php +++ b/includes/api/ApiFeedContributions.php @@ -34,6 +34,9 @@ class ApiFeedContributions extends ApiBase { /** @var RevisionStore */ private $revisionStore; + /** @var TitleParser */ + private $titleParser; + /** * This module uses a custom feed wrapper printer. * @@ -45,6 +48,7 @@ class ApiFeedContributions extends ApiBase { public function execute() { $this->revisionStore = MediaWikiServices::getInstance()->getRevisionStore(); + $this->titleParser = MediaWikiServices::getInstance()->getTitleParser(); $params = $this->extractRequestParams(); @@ -67,9 +71,19 @@ class ApiFeedContributions extends ApiBase { ' [' . $config->get( 'LanguageCode' ) . ']'; $feedUrl = SpecialPage::getTitleFor( 'Contributions', $params['user'] )->getFullURL(); - $target = $params['user'] == 'newbies' - ? 'newbies' - : Title::makeTitleSafe( NS_USER, $params['user'] )->getText(); + $target = 'newbies'; + if ( $params['user'] != 'newbies' ) { + try { + $target = $this->titleParser + ->parseTitle( $params['user'], NS_USER ) + ->getText(); + } catch ( MalformedTitleException $e ) { + $this->dieWithError( + [ 'apierror-baduser', 'user', wfEscapeWikiText( $params['user'] ) ], + 'baduser_' . $this->encodeParamName( 'user' ) + ); + } + } $feed = new $feedClasses[$params['feedformat']] ( $feedTitle, diff --git a/includes/api/ApiHelp.php b/includes/api/ApiHelp.php index 988957b6d8..2627715d5a 100644 --- a/includes/api/ApiHelp.php +++ b/includes/api/ApiHelp.php @@ -66,6 +66,23 @@ class ApiHelp extends ApiBase { ApiResult::setSubelementsList( $data, 'help' ); $result->addValue( null, $this->getModuleName(), $data ); } else { + // Show any errors at the top of the HTML + $transform = [ + 'Types' => [ 'AssocAsObject' => true ], + 'Strip' => 'all', + ]; + $errors = array_filter( [ + 'errors' => $this->getResult()->getResultData( [ 'errors' ], $transform ), + 'warnings' => $this->getResult()->getResultData( [ 'warnings' ], $transform ), + ] ); + if ( $errors ) { + $json = FormatJson::encode( $errors, true, FormatJson::UTF8_OK ); + // Escape any "--", some parsers might interpret that as end-of-comment. + // The above already escaped any "<" and ">". + $json = str_replace( '--', '-\u002D', $json ); + $html = "\n$html"; + } + $result->reset(); $result->addValue( null, 'text', $html, ApiResult::NO_SIZE_CHECK ); $result->addValue( null, 'mime', 'text/html', ApiResult::NO_SIZE_CHECK ); diff --git a/includes/api/ApiImageRotate.php b/includes/api/ApiImageRotate.php index 668bd0e427..ccb26a8392 100644 --- a/includes/api/ApiImageRotate.php +++ b/includes/api/ApiImageRotate.php @@ -101,7 +101,8 @@ class ApiImageRotate extends ApiBase { continue; } $ext = strtolower( pathinfo( "$srcPath", PATHINFO_EXTENSION ) ); - $tmpFile = TempFSFile::factory( 'rotate_', $ext, wfTempDir() ); + $tmpFile = MediaWikiServices::getInstance()->getTempFSFileFactory() + ->newTempFSFile( 'rotate_', $ext ); $dstPath = $tmpFile->getPath(); $err = $handler->rotate( $file, [ 'srcPath' => $srcPath, diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php index b36045e1f4..e787e2671a 100644 --- a/includes/api/ApiImport.php +++ b/includes/api/ApiImport.php @@ -29,7 +29,6 @@ class ApiImport extends ApiBase { public function execute() { $this->useTransactionalTimeLimit(); - $user = $this->getUser(); $params = $this->extractRequestParams(); @@ -37,7 +36,7 @@ class ApiImport extends ApiBase { $isUpload = false; if ( isset( $params['interwikisource'] ) ) { - if ( !$user->isAllowed( 'import' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'import' ) ) { $this->dieWithError( 'apierror-cantimport' ); } if ( !isset( $params['interwikipage'] ) ) { @@ -52,7 +51,7 @@ class ApiImport extends ApiBase { $usernamePrefix = $params['interwikisource']; } else { $isUpload = true; - if ( !$user->isAllowed( 'importupload' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'importupload' ) ) { $this->dieWithError( 'apierror-cantimport-upload' ); } $source = ImportStreamSource::newFromUpload( 'xml' ); diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 554ab6a285..641aa9f51e 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -1410,8 +1410,8 @@ class ApiMain extends ApiBase { */ protected function checkExecutePermissions( $module ) { $user = $this->getUser(); - if ( $module->isReadMode() && !User::isEveryoneAllowed( 'read' ) && - !$user->isAllowed( 'read' ) + if ( $module->isReadMode() && !$this->getPermissionManager()->isEveryoneAllowed( 'read' ) && + !$this->getPermissionManager()->userHasRight( $user, 'read' ) ) { $this->dieWithError( 'apierror-readapidenied' ); } @@ -1419,7 +1419,7 @@ class ApiMain extends ApiBase { if ( $module->isWriteMode() ) { if ( !$this->mEnableWrite ) { $this->dieWithError( 'apierror-noapiwrite' ); - } elseif ( !$user->isAllowed( 'writeapi' ) ) { + } elseif ( !$this->getPermissionManager()->userHasRight( $user, 'writeapi' ) ) { $this->dieWithError( 'apierror-writeapidenied' ); } elseif ( $this->getRequest()->getHeader( 'Promise-Non-Write-API-Action' ) ) { $this->dieWithError( 'apierror-promised-nonwrite-api' ); @@ -1504,7 +1504,7 @@ class ApiMain extends ApiBase { } break; case 'bot': - if ( !$user->isAllowed( 'bot' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'bot' ) ) { $this->dieWithError( 'apierror-assertbotfailed' ); } break; @@ -1539,6 +1539,12 @@ class ApiMain extends ApiBase { $this->dieWithErrorOrDebug( [ 'apierror-mustbeposted', $this->mAction ] ); } + if ( $request->wasPosted() && !$request->getHeader( 'Content-Type' ) ) { + $this->addDeprecation( + 'apiwarn-deprecation-post-without-content-type', 'post-without-content-type' + ); + } + // See if custom printer is used $this->mPrinter = $module->getCustomPrinter(); if ( is_null( $this->mPrinter ) ) { @@ -1939,7 +1945,7 @@ class ApiMain extends ApiBase { $groups = array_map( function ( $group ) { return $group == '*' ? 'all' : $group; - }, User::getGroupsWithPermission( $right ) ); + }, $this->getPermissionManager()->getGroupsWithPermission( $right ) ); $help['permissions'] .= Html::rawElement( 'dd', null, $this->msg( 'api-help-permissions-granted-to' ) @@ -2052,7 +2058,8 @@ class ApiMain extends ApiBase { */ public function canApiHighLimits() { if ( !isset( $this->mCanApiHighLimits ) ) { - $this->mCanApiHighLimits = $this->getUser()->isAllowed( 'apihighlimits' ); + $this->mCanApiHighLimits = $this->getPermissionManager() + ->userHasRight( $this->getUser(), 'apihighlimits' ); } return $this->mCanApiHighLimits; diff --git a/includes/api/ApiManageTags.php b/includes/api/ApiManageTags.php index 42de161018..6cd717a680 100644 --- a/includes/api/ApiManageTags.php +++ b/includes/api/ApiManageTags.php @@ -31,10 +31,10 @@ class ApiManageTags extends ApiBase { // make sure the user is allowed if ( $params['operation'] !== 'delete' - && !$this->getUser()->isAllowed( 'managechangetags' ) + && !$this->getPermissionManager()->userHasRight( $user, 'managechangetags' ) ) { $this->dieWithError( 'tags-manage-no-permission', 'permissiondenied' ); - } elseif ( !$this->getUser()->isAllowed( 'deletechangetags' ) ) { + } elseif ( !$this->getPermissionManager()->userHasRight( $user, 'deletechangetags' ) ) { $this->dieWithError( 'tags-delete-no-permission', 'permissiondenied' ); } diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php index 540860b3a9..d8f48b85a1 100644 --- a/includes/api/ApiMove.php +++ b/includes/api/ApiMove.php @@ -63,9 +63,10 @@ class ApiMove extends ApiBase { && !RepoGroup::singleton()->getLocalRepo()->findFile( $toTitle ) && MediaWikiServices::getInstance()->getRepoGroup()->findFile( $toTitle ) ) { - if ( !$params['ignorewarnings'] && $user->isAllowed( 'reupload-shared' ) ) { + if ( !$params['ignorewarnings'] && + $this->getPermissionManager()->userHasRight( $user, 'reupload-shared' ) ) { $this->dieWithError( 'apierror-fileexists-sharedrepo-perm' ); - } elseif ( !$user->isAllowed( 'reupload-shared' ) ) { + } elseif ( !$this->getPermissionManager()->userHasRight( $user, 'reupload-shared' ) ) { $this->dieWithError( 'apierror-cantoverwrite-sharedfile' ); } } @@ -172,7 +173,7 @@ class ApiMove extends ApiBase { * @return Status */ protected function movePage( Title $from, Title $to, $reason, $createRedirect, $changeTags ) { - $mp = new MovePage( $from, $to ); + $mp = MediaWikiServices::getInstance()->getMovePageFactory()->newMovePage( $from, $to ); $valid = $mp->isValidMove(); if ( !$valid->isOK() ) { return $valid; @@ -185,7 +186,7 @@ class ApiMove extends ApiBase { } // Check suppressredirect permission - if ( !$user->isAllowed( 'suppressredirect' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'suppressredirect' ) ) { $createRedirect = true; } diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 6b24b6347a..1b588650f0 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -971,7 +971,8 @@ class ApiPageSet extends ApiBase { // If the user can see deleted revisions, pull out the corresponding // titles from the archive table and include them too. We ignore // ar_page_id because deleted revisions are tied by title, not page_id. - if ( $goodRemaining && $this->getUser()->isAllowed( 'deletedhistory' ) ) { + if ( $goodRemaining && + $this->getPermissionManager()->userHasRight( $this->getUser(), 'deletedhistory' ) ) { $tables = [ 'archive' ]; $fields = [ 'ar_rev_id', 'ar_namespace', 'ar_title' ]; $where = [ 'ar_rev_id' => array_keys( $goodRemaining ) ]; diff --git a/includes/api/ApiQueryAllDeletedRevisions.php b/includes/api/ApiQueryAllDeletedRevisions.php index 85ca6480f1..d713b3aed1 100644 --- a/includes/api/ApiQueryAllDeletedRevisions.php +++ b/includes/api/ApiQueryAllDeletedRevisions.php @@ -237,9 +237,11 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase { // Paranoia: avoid brute force searches (T19342) // (shouldn't be able to get here without 'deletedhistory', but // check it again just in case) - if ( !$user->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'deletedhistory' ) ) { $bitmask = RevisionRecord::DELETED_USER; - } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) + ) { $bitmask = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED; } else { $bitmask = 0; diff --git a/includes/api/ApiQueryAllImages.php b/includes/api/ApiQueryAllImages.php index 40cd149181..b181710558 100644 --- a/includes/api/ApiQueryAllImages.php +++ b/includes/api/ApiQueryAllImages.php @@ -205,7 +205,7 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase { $this->addJoinConds( [ 'user_groups' => [ 'LEFT JOIN', [ - 'ug_group' => User::getGroupsWithPermission( 'bot' ), + 'ug_group' => $this->getPermissionManager()->getGroupsWithPermission( 'bot' ), 'ug_user = ' . $actorQuery['fields']['img_user'], 'ug_expiry IS NULL OR ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) ] diff --git a/includes/api/ApiQueryAllRevisions.php b/includes/api/ApiQueryAllRevisions.php index 050bc0f81e..3751102494 100644 --- a/includes/api/ApiQueryAllRevisions.php +++ b/includes/api/ApiQueryAllRevisions.php @@ -154,9 +154,11 @@ class ApiQueryAllRevisions extends ApiQueryRevisionsBase { if ( $params['user'] !== null || $params['excludeuser'] !== null ) { // Paranoia: avoid brute force searches (T19342) - if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'deletedhistory' ) ) { $bitmask = RevisionRecord::DELETED_USER; - } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $this->getUser(), 'suppressrevision', 'viewsuppressed' ) + ) { $bitmask = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED; } else { $bitmask = 0; diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 59e92e1538..023b88fea9 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -90,7 +90,8 @@ class ApiQueryAllUsers extends ApiQueryBase { if ( !is_null( $params['rights'] ) && count( $params['rights'] ) ) { $groups = []; foreach ( $params['rights'] as $r ) { - $groups = array_merge( $groups, User::getGroupsWithPermission( $r ) ); + $groups = array_merge( $groups, $this->getPermissionManager() + ->getGroupsWithPermission( $r ) ); } // no group with the given right(s) exists, no need for a query @@ -312,7 +313,7 @@ class ApiQueryAllUsers extends ApiQueryBase { } if ( $fld_rights ) { - $data['rights'] = User::getGroupPermissions( $groups ); + $data['rights'] = $this->getPermissionManager()->getGroupPermissions( $groups ); ApiResult::setIndexedTagName( $data['rights'], 'r' ); ApiResult::setArrayType( $data['rights'], 'array' ); } diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 50ca99a45d..10db848d94 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -460,7 +460,7 @@ abstract class ApiQueryBase extends ApiBase { $this->addJoinConds( $joinConds ); // Don't show hidden names - if ( !$this->getUser()->isAllowed( 'hideuser' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'hideuser' ) ) { $this->addWhere( 'ipb_deleted = 0 OR ipb_deleted IS NULL' ); } } @@ -600,7 +600,8 @@ abstract class ApiQueryBase extends ApiBase { * @return bool */ public function userCanSeeRevDel() { - return $this->getUser()->isAllowedAny( + return $this->getPermissionManager()->userHasAnyRight( + $this->getUser(), 'deletedhistory', 'deletedtext', 'suppressrevision', diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 5615f46213..c5a8d0825f 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -176,7 +176,7 @@ class ApiQueryBlocks extends ApiQueryBase { $this->addWhereIf( 'ipb_range_end > ipb_range_start', isset( $show['range'] ) ); } - if ( !$this->getUser()->isAllowed( 'hideuser' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'hideuser' ) ) { $this->addWhereFld( 'ipb_deleted', 0 ); } diff --git a/includes/api/ApiQueryContributors.php b/includes/api/ApiQueryContributors.php index 9057f1055b..fd2d199b80 100644 --- a/includes/api/ApiQueryContributors.php +++ b/includes/api/ApiQueryContributors.php @@ -152,7 +152,8 @@ class ApiQueryContributors extends ApiQueryBase { } elseif ( $params['rights'] ) { $excludeGroups = false; foreach ( $params['rights'] as $r ) { - $limitGroups = array_merge( $limitGroups, User::getGroupsWithPermission( $r ) ); + $limitGroups = array_merge( $limitGroups, $this->getPermissionManager() + ->getGroupsWithPermission( $r ) ); } // If no group has the rights requested, no need to query @@ -168,7 +169,8 @@ class ApiQueryContributors extends ApiQueryBase { } elseif ( $params['excluderights'] ) { $excludeGroups = true; foreach ( $params['excluderights'] as $r ) { - $limitGroups = array_merge( $limitGroups, User::getGroupsWithPermission( $r ) ); + $limitGroups = array_merge( $limitGroups, $this->getPermissionManager() + ->getGroupsWithPermission( $r ) ); } } diff --git a/includes/api/ApiQueryDeletedRevisions.php b/includes/api/ApiQueryDeletedRevisions.php index bbb987f760..fc88499885 100644 --- a/includes/api/ApiQueryDeletedRevisions.php +++ b/includes/api/ApiQueryDeletedRevisions.php @@ -132,9 +132,11 @@ class ApiQueryDeletedRevisions extends ApiQueryRevisionsBase { // Paranoia: avoid brute force searches (T19342) // (shouldn't be able to get here without 'deletedhistory', but // check it again just in case) - if ( !$user->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'deletedhistory' ) ) { $bitmask = RevisionRecord::DELETED_USER; - } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $this->getUser(), 'suppressrevision', 'viewsuppressed' ) + ) { $bitmask = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED; } else { $bitmask = 0; diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index a6366f2c8d..1af4d95971 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -67,7 +67,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase { } // If user can't undelete, no tokens - if ( !$user->isAllowed( 'undelete' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'undelete' ) ) { $fld_token = false; } @@ -197,9 +197,11 @@ class ApiQueryDeletedrevs extends ApiQueryBase { // Paranoia: avoid brute force searches (T19342) // (shouldn't be able to get here without 'deletedhistory', but // check it again just in case) - if ( !$user->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'deletedhistory' ) ) { $bitmask = RevisionRecord::DELETED_USER; - } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) + ) { $bitmask = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED; } else { $bitmask = 0; diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index 8e464d0195..f9087eb143 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -114,9 +114,11 @@ class ApiQueryFilearchive extends ApiQueryBase { } // Exclude files this user can't view. - if ( !$user->isAllowed( 'deletedtext' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'deletedtext' ) ) { $bitmask = File::DELETED_FILE; - } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) + ) { $bitmask = File::DELETED_FILE | File::DELETED_RESTRICTED; } else { $bitmask = 0; diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 0791426f77..b97ab3c362 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -144,7 +144,8 @@ class ApiQueryImageInfo extends ApiQueryBase { $info['imagerepository'] = $img->getRepoName(); } if ( isset( $prop['badfile'] ) ) { - $info['badfile'] = (bool)wfIsBadImage( $title, $badFileContextTitle ); + $info['badfile'] = (bool)MediaWikiServices::getInstance()->getBadFileLookup() + ->isBadFile( $title, $badFileContextTitle ); } $fit = $result->addValue( [ 'query', 'pages' ], (int)$pageId, $info ); diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 90f1340eb5..ac7e5cc8c7 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -135,7 +135,8 @@ class ApiQueryInfo extends ApiQueryBase { // but that's too expensive for this purpose // and would break caching global $wgUser; - if ( !$wgUser->isAllowed( 'edit' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $wgUser, 'edit' ) ) { return false; } @@ -152,7 +153,8 @@ class ApiQueryInfo extends ApiQueryBase { */ public static function getDeleteToken( $pageid, $title ) { global $wgUser; - if ( !$wgUser->isAllowed( 'delete' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $wgUser, 'delete' ) ) { return false; } @@ -169,7 +171,8 @@ class ApiQueryInfo extends ApiQueryBase { */ public static function getProtectToken( $pageid, $title ) { global $wgUser; - if ( !$wgUser->isAllowed( 'protect' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $wgUser, 'protect' ) ) { return false; } @@ -186,7 +189,8 @@ class ApiQueryInfo extends ApiQueryBase { */ public static function getMoveToken( $pageid, $title ) { global $wgUser; - if ( !$wgUser->isAllowed( 'move' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $wgUser, 'move' ) ) { return false; } @@ -203,7 +207,8 @@ class ApiQueryInfo extends ApiQueryBase { */ public static function getBlockToken( $pageid, $title ) { global $wgUser; - if ( !$wgUser->isAllowed( 'block' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $wgUser, 'block' ) ) { return false; } @@ -245,7 +250,9 @@ class ApiQueryInfo extends ApiQueryBase { */ public static function getImportToken( $pageid, $title ) { global $wgUser; - if ( !$wgUser->isAllowedAny( 'import', 'importupload' ) ) { + if ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasAnyRight( $wgUser, 'import', 'importupload' ) ) { return false; } @@ -808,7 +815,7 @@ class ApiQueryInfo extends ApiQueryBase { $user = $this->getUser(); if ( $user->isAnon() || count( $this->everything ) == 0 - || !$user->isAllowed( 'viewmywatchlist' ) + || !$this->getPermissionManager()->userHasRight( $user, 'viewmywatchlist' ) ) { return; } @@ -843,7 +850,7 @@ class ApiQueryInfo extends ApiQueryBase { } $user = $this->getUser(); - $canUnwatchedpages = $user->isAllowed( 'unwatchedpages' ); + $canUnwatchedpages = $this->getPermissionManager()->userHasRight( $user, 'unwatchedpages' ); $unwatchedPageThreshold = $this->getConfig()->get( 'UnwatchedPageThreshold' ); if ( !$canUnwatchedpages && !is_int( $unwatchedPageThreshold ) ) { return; @@ -873,7 +880,7 @@ class ApiQueryInfo extends ApiQueryBase { $user = $this->getUser(); $db = $this->getDB(); - $canUnwatchedpages = $user->isAllowed( 'unwatchedpages' ); + $canUnwatchedpages = $this->getPermissionManager()->userHasRight( $user, 'unwatchedpages' ); $unwatchedPageThreshold = $this->getConfig()->get( 'UnwatchedPageThreshold' ); if ( !$canUnwatchedpages && !is_int( $unwatchedPageThreshold ) ) { return; diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 962d956130..47a6f87296 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -220,10 +220,12 @@ class ApiQueryLogEvents extends ApiQueryBase { // Paranoia: avoid brute force searches (T19342) if ( $params['namespace'] !== null || !is_null( $title ) || !is_null( $user ) ) { - if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'deletedhistory' ) ) { $titleBits = LogPage::DELETED_ACTION; $userBits = LogPage::DELETED_USER; - } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $this->getUser(), 'suppressrevision', 'viewsuppressed' ) + ) { $titleBits = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED; $userBits = LogPage::DELETED_USER | LogPage::DELETED_RESTRICTED; } else { diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 8ae1b668b4..143d4662a1 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -312,12 +312,6 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { /* Add fields to our query if they are specified as a needed parameter. */ $this->addFieldsIf( [ 'rc_this_oldid', 'rc_last_oldid' ], $this->fld_ids ); - if ( $this->fld_user || $this->fld_userid ) { - $actorQuery = ActorMigration::newMigration()->getJoin( 'rc_user' ); - $this->addTables( $actorQuery['tables'] ); - $this->addFields( $actorQuery['fields'] ); - $this->addJoinConds( $actorQuery['joins'] ); - } $this->addFieldsIf( [ 'rc_minor', 'rc_type', 'rc_bot' ], $this->fld_flags ); $this->addFieldsIf( [ 'rc_old_len', 'rc_new_len' ], $this->fld_sizes ); $this->addFieldsIf( [ 'rc_patrolled', 'rc_log_type' ], $this->fld_patrolled ); @@ -367,9 +361,11 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { // Paranoia: avoid brute force searches (T19342) if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) { - if ( !$user->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'deletedhistory' ) ) { $bitmask = RevisionRecord::DELETED_USER; - } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) + ) { $bitmask = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED; } else { $bitmask = 0; @@ -380,9 +376,11 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { } if ( $this->getRequest()->getCheck( 'namespace' ) ) { // LogPage::DELETED_ACTION hides the affected page, too. - if ( !$user->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'deletedhistory' ) ) { $bitmask = LogPage::DELETED_ACTION; - } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) + ) { $bitmask = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED; } else { $bitmask = 0; @@ -405,6 +403,14 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { $this->addJoinConds( $commentQuery['joins'] ); } + if ( $this->fld_user || $this->fld_userid || !is_null( $this->token ) ) { + // Token needs rc_user for RecentChange::newFromRow/User::newFromAnyId (T228425) + $actorQuery = ActorMigration::newMigration()->getJoin( 'rc_user' ); + $this->addTables( $actorQuery['tables'] ); + $this->addFields( $actorQuery['fields'] ); + $this->addJoinConds( $actorQuery['joins'] ); + } + $this->addOption( 'LIMIT', $params['limit'] + 1 ); $hookData = []; diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index fe3ae87d52..d616ad4f9a 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -76,7 +76,8 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase { */ public static function getRollbackToken( $pageid, $title, $rev ) { global $wgUser; - if ( !$wgUser->isAllowed( 'rollback' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $wgUser, 'rollback' ) ) { return false; } @@ -332,9 +333,11 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase { } if ( $params['user'] !== null || $params['excludeuser'] !== null ) { // Paranoia: avoid brute force searches (T19342) - if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'deletedhistory' ) ) { $bitmask = RevisionRecord::DELETED_USER; - } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $this->getUser(), 'suppressrevision', 'viewsuppressed' ) + ) { $bitmask = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED; } else { $bitmask = 0; diff --git a/includes/api/ApiQueryUserContribs.php b/includes/api/ApiQueryUserContribs.php index 379f1afd39..919c7631b3 100644 --- a/includes/api/ApiQueryUserContribs.php +++ b/includes/api/ApiQueryUserContribs.php @@ -408,9 +408,11 @@ class ApiQueryUserContribs extends ApiQueryBase { // Don't include any revisions where we're not supposed to be able to // see the username. $user = $this->getUser(); - if ( !$user->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'deletedhistory' ) ) { $bitmask = RevisionRecord::DELETED_USER; - } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) + ) { $bitmask = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED; } else { $bitmask = 0; diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index ba7280da10..ab8d93a4f9 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -159,8 +159,7 @@ class ApiQueryUserInfo extends ApiQueryBase { } if ( isset( $this->prop['rights'] ) ) { - // User::getRights() may return duplicate values, strip them - $vals['rights'] = array_values( array_unique( $user->getRights() ) ); + $vals['rights'] = $this->getPermissionManager()->getUserPermissions( $user ); ApiResult::setArrayType( $vals['rights'], 'array' ); // even if empty ApiResult::setIndexedTagName( $vals['rights'], 'r' ); // even if empty } @@ -180,7 +179,7 @@ class ApiQueryUserInfo extends ApiQueryBase { if ( isset( $this->prop['preferencestoken'] ) && !$this->lacksSameOriginSecurity() && - $user->isAllowed( 'editmyoptions' ) + $this->getPermissionManager()->userHasRight( $user, 'editmyoptions' ) ) { $vals['preferencestoken'] = $user->getEditToken( '', $this->getMain()->getRequest() ); } @@ -201,7 +200,8 @@ class ApiQueryUserInfo extends ApiQueryBase { $vals['realname'] = $user->getRealName(); } - if ( $user->isAllowed( 'viewmyprivateinfo' ) && isset( $this->prop['email'] ) ) { + if ( $this->getPermissionManager()->userHasRight( $user, 'viewmyprivateinfo' ) && + isset( $this->prop['email'] ) ) { $vals['email'] = $user->getEmail(); $auth = $user->getEmailAuthenticationTimestamp(); if ( $auth !== null ) { diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index 66d8db4987..8e26d37e08 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -225,7 +225,8 @@ class ApiQueryUsers extends ApiQueryBase { } if ( isset( $this->prop['rights'] ) ) { - $data[$key]['rights'] = $user->getRights(); + $data[$key]['rights'] = $this->getPermissionManager() + ->getUserPermissions( $user ); } if ( $row->ipb_deleted ) { $data[$key]['hidden'] = true; diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php index 5cef194f36..0718ac82c3 100644 --- a/includes/api/ApiUnblock.php +++ b/includes/api/ApiUnblock.php @@ -41,7 +41,7 @@ class ApiUnblock extends ApiBase { $this->requireOnlyOneParameter( $params, 'id', 'user', 'userid' ); - if ( !$user->isAllowed( 'block' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $user, 'block' ) ) { $this->dieWithError( 'apierror-permissiondenied-unblock', 'permissiondenied' ); } # T17810: blocked admins should have limited access here diff --git a/includes/api/ApiUserrights.php b/includes/api/ApiUserrights.php index 8f3c404116..89ec6cbdbc 100644 --- a/includes/api/ApiUserrights.php +++ b/includes/api/ApiUserrights.php @@ -51,7 +51,7 @@ class ApiUserrights extends ApiBase { // Deny if the user is blocked and doesn't have the full 'userrights' permission. // This matches what Special:UserRights does for the web UI. - if ( !$pUser->isAllowed( 'userrights' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $pUser, 'userrights' ) ) { $block = $pUser->getBlock(); if ( $block && $block->isSitewide() ) { $this->dieBlocked( $block ); diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index 6625863716..8b42a07e8e 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -1908,6 +1908,7 @@ "apiwarn-deprecation-missingparam": "Because $1 was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used.", "apiwarn-deprecation-parameter": "The parameter $1 has been deprecated.", "apiwarn-deprecation-parse-headitems": "prop=headitems is deprecated since MediaWiki 1.28. Use prop=headhtml when creating new HTML documents, or prop=modules|jsconfigvars when updating a document client-side.", + "apiwarn-deprecation-post-without-content-type": "A POST request was made without a Content-Type header. This does not work reliably.", "apiwarn-deprecation-purge-get": "Use of action=purge via GET is deprecated. Use POST instead.", "apiwarn-deprecation-withreplacement": "$1 has been deprecated. Please use $2 instead.", "apiwarn-difftohidden": "Couldn't diff to r$1: content is hidden.", diff --git a/includes/api/i18n/mk.json b/includes/api/i18n/mk.json index 968d963322..28453409ea 100644 --- a/includes/api/i18n/mk.json +++ b/includes/api/i18n/mk.json @@ -189,6 +189,8 @@ "apihelp-login-example-login": "Најава", "apihelp-logout-summary": "Одјави се и исчисти ги податоците на седницата.", "apihelp-logout-example-logout": "Одјави го тековниот корисник", + "apihelp-managetags-summary": "Извршување на раководни задачи по промена на ознаки.", + "apihelp-managetags-param-reason": "Незадолжителна причина за создавање, бришење, активирање или деактивирање на ознаката.", "apihelp-mergehistory-summary": "Спојување на истории на страници.", "apihelp-move-summary": "Премести страница.", "apihelp-move-param-from": "Наслов на страницата што треба да се премести. Не може да се користи заедно со $1fromid.", @@ -562,6 +564,17 @@ "api-help-right-apihighlimits": "Употреба на повисоки ограничувања за приложни барања (бавни барања: $1; брзи барања: $2). Ограничувањата за бавни барања важат и за повеќевредносни параметри.", "apierror-badgenerator-unknown": "Непознат generator=$1.", "apierror-badquery": "Неважечко барање.", + "apierror-copyuploadbaddomain": "Подигањето преку URL не е дозволено од овој домен.", + "apierror-copyuploadbadurl": "Подигањето не е дозволено од оваа URL-адреса.", + "apierror-emptynewsection": "Создавањето на нови празни поднаслови не е дозволено.", + "apierror-emptypage": "Создавањето на нови празни страници не е дозволено.", + "apierror-filedoesnotexist": "Податотеката не постои.", + "apierror-imageusage-badtitle": "Насловот за $1 мора да е податотека.", + "apierror-import-unknownerror": "Непозната грешка при увозот: $1.", + "apierror-invalidcategory": "Наведеното име на категорија не е важечко.", + "apierror-invalid-file-key": "Не е важечки податотечен клуч.", + "apierror-missingtitle": "Наведената страница не постои.", + "apierror-missingtitle-byname": "Страницата $1 не постои.", "apierror-offline": "Не можев да продолжам поради проблем при поврзувањето со мрежата. Проверете дали сте поврзани со семрежјето и обидете се повторно.", "apierror-timeout": "Опслужувачот не одговори во очекуваното време.", "api-credits-header": "Признанија", diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json index d5de23f9bf..87f056bb04 100644 --- a/includes/api/i18n/qqq.json +++ b/includes/api/i18n/qqq.json @@ -1795,6 +1795,7 @@ "apiwarn-deprecation-missingparam": "{{doc-apierror}}\n\nParameters:\n* $1 - Parameter name.", "apiwarn-deprecation-parameter": "{{doc-apierror}}\n\nParameters:\n* $1 - Parameter name.", "apiwarn-deprecation-parse-headitems": "{{doc-apierror}}", + "apiwarn-deprecation-post-without-content-type": "{{doc-apierror}}", "apiwarn-deprecation-purge-get": "{{doc-apierror}}", "apiwarn-deprecation-withreplacement": "{{doc-apierror}}\n\nParameters:\n* $1 - Query string fragment that is deprecated, e.g. \"action=tokens\".\n* $2 - Query string fragment to use instead, e.g. \"action=tokens\".", "apiwarn-difftohidden": "{{doc-apierror}}\n\nParameters:\n* $1 - Revision ID number.\n\n\"r\" is short for \"revision\". You may translate it.", diff --git a/includes/api/i18n/ru.json b/includes/api/i18n/ru.json index 599cbb8707..c91976f5cf 100644 --- a/includes/api/i18n/ru.json +++ b/includes/api/i18n/ru.json @@ -94,9 +94,9 @@ "apihelp-compare-param-fromid": "Идентификатор первой сравниваемой страницы.", "apihelp-compare-param-fromrev": "Первая сравниваемая версия.", "apihelp-compare-param-frompst": "Выполнить преобразование перед записью правки (PST) над fromtext-{slot}.", - "apihelp-compare-param-fromtext": "Используйте этот текст вместо содержимого версии, заданной fromtitle, fromid или fromrev.", - "apihelp-compare-param-fromcontentmodel": "Модель содержимого fromtext. Если не задана, будет угадана по другим параметрам.", - "apihelp-compare-param-fromcontentformat": "Формат сериализации содержимого fromtext.", + "apihelp-compare-param-fromtext": "Укажите fromslots=main и используйте fromtext-main.", + "apihelp-compare-param-fromcontentmodel": "Укажите fromslots=main и используйте fromcontentmodel-main.", + "apihelp-compare-param-fromcontentformat": "Укажите fromslots=main и используйте fromcontentformat-main.", "apihelp-compare-param-fromsection": "Использовать только указанную секцию из содержимого «from».", "apihelp-compare-param-totitle": "Заголовок второй сравниваемой страницы.", "apihelp-compare-param-toid": "Идентификатор второй сравниваемой страницы.", @@ -104,9 +104,9 @@ "apihelp-compare-param-torelative": "Использовать версию, относящуюся к определённой fromtitle, fromid или fromrev. Все другие опции 'to' будут проигнорированы.", "apihelp-compare-param-topst": "Выполнить преобразование перед записью правки (PST) над totext.", "apihelp-compare-param-tocontentmodel-{slot}": "Модель содержимого totext-{slot}. Если не задана, будет угадана по другим параметрам.", - "apihelp-compare-param-totext": "Используйте этот текст вместо содержимого версии, заданной totitle, toid или torev.", - "apihelp-compare-param-tocontentmodel": "Модель содержимого totext. Если не задана, будет угадана по другим параметрам.", - "apihelp-compare-param-tocontentformat": "Формат сериализации содержимого totext.", + "apihelp-compare-param-totext": "Укажите toslots=main и используйте totext-main.", + "apihelp-compare-param-tocontentmodel": "Укажите toslots=main и используйте tocontentmodel-main.", + "apihelp-compare-param-tocontentformat": "Укажите toslots=main и используйте tocontentformat-main.", "apihelp-compare-param-tosection": "Использовать только указанную секцию из содержимого «to».", "apihelp-compare-param-prop": "Какую информацию получить.", "apihelp-compare-paramvalue-prop-diff": "HTML-код разницы.", @@ -362,7 +362,7 @@ "apihelp-parse-paramvalue-prop-revid": "Добавляет идентификатор версии распарсенной страницы.", "apihelp-parse-paramvalue-prop-displaytitle": "Добавляет название проанализированного вики-текста.", "apihelp-parse-paramvalue-prop-headitems": "Возвращает элементы, которые следует поместить в <head> страницы.", - "apihelp-parse-paramvalue-prop-headhtml": "Возвращает распарсенный <head> страницы.", + "apihelp-parse-paramvalue-prop-headhtml": "Возвращает распарсенный тип документа, начальный <html>, элемент <head> и открывающий <body>.", "apihelp-parse-paramvalue-prop-modules": "Возвращает использованные на странице модули ResourceLoader. Для загрузки, используйте mw.loader.using(). Одновременно с modules должно быть запрошено либо jsconfigvars, либо encodedjsconfigvars.", "apihelp-parse-paramvalue-prop-jsconfigvars": "Возвращает переменные JavaScript с данными настроек для этой страницы. Для их применения используйте mw.config.set().", "apihelp-parse-paramvalue-prop-encodedjsconfigvars": "Возвращает переменные JavaScript с данными настроек для этой страницы в виде JSON-строки.", @@ -1066,10 +1066,10 @@ "apihelp-query+revisions+base-paramvalue-prop-userid": "Идентификатор создателя версии.", "apihelp-query+revisions+base-paramvalue-prop-size": "Длина версии (в байтах).", "apihelp-query+revisions+base-paramvalue-prop-sha1": "SHA-1-хэш (base 16) версии.", - "apihelp-query+revisions+base-paramvalue-prop-contentmodel": "Идентификатор модели содержимого версии.", + "apihelp-query+revisions+base-paramvalue-prop-contentmodel": "Идентификатор модели содержимого каждого слота версии.", "apihelp-query+revisions+base-paramvalue-prop-comment": "Описание правки.", "apihelp-query+revisions+base-paramvalue-prop-parsedcomment": "Распарсенное описание правки.", - "apihelp-query+revisions+base-paramvalue-prop-content": "Текст версии.", + "apihelp-query+revisions+base-paramvalue-prop-content": "Содержание каждого слота версии.", "apihelp-query+revisions+base-paramvalue-prop-tags": "Метки версии.", "apihelp-query+revisions+base-paramvalue-prop-parsetree": "Используйте [[Special:ApiHelp/expandtemplates|action=expandtemplates]] или [[Special:ApiHelp/parse|action=parse]]. Дерево парсинга XML-содержимого версии (требуется модель содержимого $1).", "apihelp-query+revisions+base-param-limit": "Сколько версий вернуть.", @@ -1495,7 +1495,7 @@ "api-help-param-templated-var-first": "{$1} в названии параметра должно быть заменено значениями $2", "api-help-param-templated-var": "{$1} — значениями $2", "api-help-datatypes-header": "Типы данных", - "api-help-datatypes": "Ввод в MediaWiki должен быть NFC-нормализованным UTF-8. MediaWiki может попытаться преобразовать другой ввод, но это приведёт к провалу некоторых операций (таких, как [[Special:ApiHelp/edit|редактирование]] со сверкой MD5).\n\nНекоторые типы параметров в запросах API требуют дополнительных пояснений:\n;логический\n:Логические параметры работают как флажки (checkboxes) в HTML: если параметр задан, независимо от его значения, он воспринимается за истину. Для передачи ложного значения просто опустите параметр.\n;временные метки\n:Временные метки могут быть заданы в нескольких форматах. Рекомендуемым является дата и время ISO 8601. Всё время считается в UTC, любые включённые часовые пояса игнорируются.\n:* Дата и время ISO 8601: 2001-01-15T14:56:00Z (знаки препинания и Z необязательны)\n:* Дата и время ISO 8601 с (игнорируемой) дробной частью секунд: 2001-01-15T14:56:00.00001Z (дефисы, двоеточия и Z необязательны)\n:* Формат MediaWiki: 20010115145600\n:* Общий числовой формат: 2001-01-15 14:56:00 (необязательный часовой пояс GMT, +## или -## игнорируется)\n:* Формат EXIF: 2001:01:15 14:56:00\n:* Формат RFC 2822 (часовой пояс может быть опущен): Mon, 15 Jan 2001 14:56:00\n:* Формат RFC 850 (часовой пояс может быть опущен): Monday, 15-Jan-2001 14:56:00\n:* Формат ctime языка программирования C: Mon Jan 15 14:56:00 2001\n:* Количество секунд, прошедших с 1970-01-01T00:00:00Z, в виде челого числа с от 1 до 13 знаками (исключая 0)\n:* Строка now\n;альтернативный разделитель значений\n:Параметры, принимающие несколько значений, обычно отправляются со значениями, разделёнными с помощью символа пайпа, например, param=value1|value2 или param=value1%7Cvalue2. Если значение должно содержать символ пайпа, используйте U+001F (Unit Separator) в качестве разделителя ''и'' добавьте в начало значения U+001F, например, param=%1Fvalue1%1Fvalue2.", + "api-help-datatypes": "Ввод в MediaWiki должен быть NFC-нормализованным UTF-8. MediaWiki может попытаться преобразовать другой ввод, но это приведёт к провалу некоторых операций (таких, как [[Special:ApiHelp/edit|редактирование]] со сверкой MD5).\n\nНекоторые типы параметров в запросах API требуют дополнительных пояснений:\n;логический\n:Логические параметры работают как флажки (checkboxes) в HTML: если параметр задан, независимо от его значения, он воспринимается за истину. Для передачи ложного значения просто опустите параметр.\n;временные метки\n:Временные метки могут быть заданы в нескольких форматах (детальнее см. [[mw:Special:MyLanguage/Timestamp|Timestamp library input formats on mediawiki.org]]). Рекомендуемым является дата и время ISO 8601.\n2001-01-15T14:56:00Z. Дополнительно, строка now может использоваться, чтобы указать текущую временную метку.\n;альтернативный разделитель значений\n:Параметры, принимающие несколько значений, обычно отправляются со значениями, разделёнными с помощью символа пайпа, например, param=value1|value2 или param=value1%7Cvalue2. Если значение должно содержать символ пайпа, используйте U+001F (Unit Separator) в качестве разделителя ''и'' добавьте в начало значения U+001F, например, param=%1Fvalue1%1Fvalue2.", "api-help-templatedparams-header": "Шаблонные параметры", "api-help-templatedparams": "Шаблонные параметры используются в случаях, когда модулю API нужно получить по параметру со значением на каждое значение другого параметра. Например, если бы был модуль API, запрашивающий фрукты, у него мог бы быть параметр фрукты, указывающий, какие фрукты запрашиваются, и шаблонный параметр {фрукт}-в-количестве, указывающий, сколько фруктов каждого вида запросить. Клиент API, который хочет запросить 1 яблоко, 5 бананов и 20 апельсинов, мог бы тогда сделать запрос наподобие фрукты=яблоки|бананы|апельсины&яблоки-в-количестве=1&бананы-в-количестве=5&апельсины-в-количестве=20.", "api-help-param-type-limit": "Тип: целое число или max", diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index c871ce1cb3..4fcaf4e9e9 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -1639,8 +1639,9 @@ class AuthManager implements LoggerAwareInterface { // Is the IP user able to create accounts? $anon = new User; - if ( $source !== self::AUTOCREATE_SOURCE_MAINT && - !$anon->isAllowedAny( 'createaccount', 'autocreateaccount' ) + if ( $source !== self::AUTOCREATE_SOURCE_MAINT && !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasAnyRight( $anon, 'createaccount', 'autocreateaccount' ) ) { $this->logger->debug( __METHOD__ . ': IP lacks the ability to create or autocreate accounts', [ 'username' => $username, diff --git a/includes/block/AbstractBlock.php b/includes/block/AbstractBlock.php index f6544040bb..fcc624e6c3 100644 --- a/includes/block/AbstractBlock.php +++ b/includes/block/AbstractBlock.php @@ -23,6 +23,7 @@ namespace MediaWiki\Block; use IContextSource; use InvalidArgumentException; use IP; +use MediaWiki\MediaWikiServices; use RequestContext; use Title; use User; @@ -95,6 +96,7 @@ abstract class AbstractBlock { * reason string Reason of the block * timestamp string The time at which the block comes into effect * byText string Username of the blocker (for foreign users) + * hideName bool Hide the target user name */ public function __construct( array $options = [] ) { $defaults = [ @@ -103,6 +105,7 @@ abstract class AbstractBlock { 'reason' => '', 'timestamp' => '', 'byText' => '', + 'hideName' => false, ]; $options += $defaults; @@ -119,6 +122,7 @@ abstract class AbstractBlock { $this->setReason( $options['reason'] ); $this->setTimestamp( wfTimestamp( TS_MW, $options['timestamp'] ) ); + $this->setHideName( (bool)$options['hideName'] ); } /** @@ -279,8 +283,9 @@ abstract class AbstractBlock { if ( !$res && $blockDisablesLogin ) { // If a block would disable login, then it should // prevent any right that all users cannot do + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); $anon = new User; - $res = $anon->isAllowed( $right ) ? $res : true; + $res = $permissionManager->userHasRight( $anon, $right ) ? $res : true; } return $res; @@ -339,8 +344,9 @@ abstract class AbstractBlock { if ( !$res && $blockDisablesLogin ) { // If a block would disable login, then it should // prevent any action that all users cannot do + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); $anon = new User; - $res = $anon->isAllowed( $action ) ? $res : true; + $res = $permissionManager->userHasRight( $anon, $action ) ? $res : true; } return $res; diff --git a/includes/block/BlockManager.php b/includes/block/BlockManager.php index b67703cab1..03043e1509 100644 --- a/includes/block/BlockManager.php +++ b/includes/block/BlockManager.php @@ -21,9 +21,12 @@ namespace MediaWiki\Block; use DateTime; +use DateTimeZone; use DeferredUpdates; +use Hooks; use IP; use MediaWiki\Config\ServiceOptions; +use MediaWiki\Permissions\PermissionManager; use MediaWiki\User\UserIdentity; use MWCryptHash; use User; @@ -45,6 +48,9 @@ class BlockManager { /** @var WebRequest */ private $currentRequest; + /** @var PermissionManager */ + private $permissionManager; + /** * TODO Make this a const when HHVM support is dropped (T192166) * @@ -67,16 +73,19 @@ class BlockManager { * @param ServiceOptions $options * @param User $currentUser * @param WebRequest $currentRequest + * @param PermissionManager $permissionManager */ public function __construct( ServiceOptions $options, User $currentUser, - WebRequest $currentRequest + WebRequest $currentRequest, + PermissionManager $permissionManager ) { $options->assertRequiredOptions( self::$constructorOptions ); $this->options = $options; $this->currentUser = $currentUser; $this->currentRequest = $currentRequest; + $this->permissionManager = $permissionManager; } /** @@ -110,7 +119,8 @@ class BlockManager { $globalUserName = $sessionUser->isSafeToLoad() ? $sessionUser->getName() : IP::sanitizeIP( $this->currentRequest->getIP() ); - if ( $user->getName() === $globalUserName && !$user->isAllowed( 'ipblock-exempt' ) ) { + if ( $user->getName() === $globalUserName && + !$this->permissionManager->userHasRight( $user, 'ipblock-exempt' ) ) { $ip = $this->currentRequest->getIP(); } @@ -175,6 +185,7 @@ class BlockManager { // Filter out any duplicated blocks, e.g. from the cookie $blocks = $this->getUniqueBlocks( $blocks ); + $block = null; if ( count( $blocks ) > 0 ) { if ( count( $blocks ) === 1 ) { $block = $blocks[ 0 ]; @@ -186,10 +197,11 @@ class BlockManager { 'originalBlocks' => $blocks, ] ); } - return $block; } - return null; + Hooks::run( 'GetUserBlock', [ clone $user, $ip, &$block ] ); + + return $block; } /** @@ -218,12 +230,12 @@ class BlockManager { } } - return array_merge( $systemBlocks, $databaseBlocks ); + return array_values( array_merge( $systemBlocks, $databaseBlocks ) ); } /** * Try to load a block from an ID given in a cookie value. If the block is invalid - * or doesn't exist, remove the cookie. + * doesn't exist, or the cookie value is malformed, remove the cookie. * * @param UserIdentity $user * @param WebRequest $request @@ -233,9 +245,13 @@ class BlockManager { UserIdentity $user, WebRequest $request ) { - $blockCookieId = $this->getIdFromCookieValue( $request->getCookie( 'BlockID' ) ); + $cookieValue = $request->getCookie( 'BlockID' ); + if ( is_null( $cookieValue ) ) { + return false; + } - if ( $blockCookieId !== null ) { + $blockCookieId = $this->getIdFromCookieValue( $cookieValue ); + if ( !is_null( $blockCookieId ) ) { // TODO: remove dependency on DatabaseBlock $block = DatabaseBlock::newFromID( $blockCookieId ); if ( @@ -244,9 +260,10 @@ class BlockManager { ) { return $block; } - $this->clearBlockCookie( $request->response() ); } + $this->clearBlockCookie( $request->response() ); + return false; } @@ -435,7 +452,11 @@ class BlockManager { } // Set the cookie. Reformat the MediaWiki datetime as a Unix timestamp for the cookie. - $expiryValue = DateTime::createFromFormat( 'YmdHis', $expiryTime )->format( 'U' ); + $expiryValue = DateTime::createFromFormat( + 'YmdHis', + $expiryTime, + new DateTimeZone( 'UTC' ) + )->format( 'U' ); $cookieOptions = [ 'httpOnly' => false ]; $cookieValue = $this->getCookieValue( $block ); $response->setCookie( 'BlockID', $cookieValue, $expiryValue, $cookieOptions ); diff --git a/includes/block/DatabaseBlock.php b/includes/block/DatabaseBlock.php index 2fd62ee332..79286c5acf 100644 --- a/includes/block/DatabaseBlock.php +++ b/includes/block/DatabaseBlock.php @@ -93,7 +93,6 @@ class DatabaseBlock extends AbstractBlock { * anonOnly bool Only disallow anonymous actions * createAccount bool Disallow creation of new accounts * enableAutoblock bool Enable automatic blocking - * hideName bool Hide the target user name * blockEmail bool Disallow sending emails * allowUsertalk bool Allow the target to edit its own talk page * sitewide bool Disallow editing all pages and all contribution @@ -112,7 +111,6 @@ class DatabaseBlock extends AbstractBlock { 'anonOnly' => false, 'createAccount' => false, 'enableAutoblock' => false, - 'hideName' => false, 'blockEmail' => false, 'allowUsertalk' => false, 'sitewide' => true, @@ -129,7 +127,6 @@ class DatabaseBlock extends AbstractBlock { # Boolean settings $this->mAuto = (bool)$options['auto']; - $this->setHideName( (bool)$options['hideName'] ); $this->isHardblock( !$options['anonOnly'] ); $this->isAutoblocking( (bool)$options['enableAutoblock'] ); $this->isSitewide( (bool)$options['sitewide'] ); diff --git a/includes/cache/GenderCache.php b/includes/cache/GenderCache.php index eedc3c6f04..a181507e4e 100644 --- a/includes/cache/GenderCache.php +++ b/includes/cache/GenderCache.php @@ -21,7 +21,9 @@ * @author Niklas Laxström * @ingroup Cache */ + use MediaWiki\MediaWikiServices; +use Wikimedia\Rdbms\ILoadBalancer; /** * Caches user genders when needed to use correct namespace aliases. @@ -37,8 +39,12 @@ class GenderCache { /** @var NamespaceInfo */ private $nsInfo; - public function __construct( NamespaceInfo $nsInfo = null ) { + /** @var ILoadBalancer|null */ + private $loadBalancer; + + public function __construct( NamespaceInfo $nsInfo = null, ILoadBalancer $loadBalancer = null ) { $this->nsInfo = $nsInfo ?? MediaWikiServices::getInstance()->getNamespaceInfo(); + $this->loadBalancer = $loadBalancer; } /** @@ -164,7 +170,13 @@ class GenderCache { return; } - $dbr = wfGetDB( DB_REPLICA ); + // Only query database, when load balancer is provided by service wiring + // This maybe not happen when running as part of the installer + if ( $this->loadBalancer === null ) { + return; + } + + $dbr = $this->loadBalancer->getConnectionRef( DB_REPLICA ); $table = [ 'user', 'user_properties' ]; $fields = [ 'user_name', 'up_value' ]; $conds = [ 'user_name' => $usersToCheck ]; diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 57454516f3..93fdb162e2 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -105,44 +105,14 @@ class MessageCache { private $loadedLanguages = []; /** - * Singleton instance - * - * @var MessageCache $instance - */ - private static $instance; - - /** - * Get the signleton instance of this class + * Get the singleton instance of this class * + * @deprecated in 1.34 inject an instance of this class instead of using global state * @since 1.18 * @return MessageCache */ public static function singleton() { - if ( self::$instance === null ) { - global $wgUseDatabaseMessages, $wgMsgCacheExpiry, $wgUseLocalMessageCache; - $services = MediaWikiServices::getInstance(); - self::$instance = new self( - $services->getMainWANObjectCache(), - wfGetMessageCacheStorage(), - $wgUseLocalMessageCache - ? $services->getLocalServerObjectCache() - : new EmptyBagOStuff(), - $wgUseDatabaseMessages, - $wgMsgCacheExpiry, - $services->getContentLanguage() - ); - } - - return self::$instance; - } - - /** - * Destroy the singleton instance - * - * @since 1.18 - */ - public static function destroyInstance() { - self::$instance = null; + return MediaWikiServices::getInstance()->getMessageCache(); } /** diff --git a/includes/cache/localisation/LocalisationCache.php b/includes/cache/localisation/LocalisationCache.php index ffc7cd00d6..fb4675eb30 100644 --- a/includes/cache/localisation/LocalisationCache.php +++ b/includes/cache/localisation/LocalisationCache.php @@ -22,14 +22,15 @@ use CLDRPluralRuleParser\Evaluator; use CLDRPluralRuleParser\Error as CLDRPluralRuleError; -use MediaWiki\Logger\LoggerFactory; -use MediaWiki\MediaWikiServices; +use MediaWiki\Config\ServiceOptions; +use MediaWiki\Languages\LanguageNameUtils; +use Psr\Log\LoggerInterface; /** * Class for caching the contents of localisation files, Messages*.php * and *.i18n.php. * - * An instance of this class is available using Language::getLocalisationCache(). + * An instance of this class is available using MediaWikiServices. * * The values retrieved from here are merged, containing items from extension * files, core messages files and the language fallback sequence (e.g. zh-cn -> @@ -40,8 +41,8 @@ use MediaWiki\MediaWikiServices; class LocalisationCache { const VERSION = 4; - /** Configuration associative array */ - private $conf; + /** @var ServiceOptions */ + private $options; /** * True if recaching should only be done on an explicit call to recache(). @@ -50,11 +51,6 @@ class LocalisationCache { */ private $manualRecache = false; - /** - * True to treat all files as expired until they are regenerated by this object. - */ - private $forceRecache = false; - /** * The cache data. 3-d array, where the first key is the language code, * the second key is the item key e.g. 'messages', and the third key is @@ -71,10 +67,16 @@ class LocalisationCache { private $store; /** - * @var \Psr\Log\LoggerInterface + * @var LoggerInterface */ private $logger; + /** @var callable[] See comment for parameter in constructor */ + private $clearStoreCallbacks; + + /** @var LanguageNameUtils */ + private $langNameUtils; + /** * A 2-d associative array, code/key, where presence indicates that the item * is loaded. Value arbitrary. @@ -188,60 +190,52 @@ class LocalisationCache { private $mergeableKeys = null; + /** + * @todo Make this a const when HHVM support is dropped (T192166) + * + * @var array + * @since 1.34 + */ + public static $constructorOptions = [ + // True to treat all files as expired until they are regenerated by this object. + 'forceRecache', + 'manualRecache', + 'ExtensionMessagesFiles', + 'MessagesDirs', + ]; + /** * For constructor parameters, see the documentation in DefaultSettings.php * for $wgLocalisationCacheConf. * - * @param array $conf + * Do not construct this directly. Use MediaWikiServices. + * + * @param ServiceOptions $options + * @param LCStore $store What backend to use for storage + * @param LoggerInterface $logger + * @param callable[] $clearStoreCallbacks To be called whenever the cache is cleared. Can be + * used to clear other caches that depend on this one, such as ResourceLoader's + * MessageBlobStore. + * @param LanguageNameUtils $langNameUtils * @throws MWException */ - function __construct( $conf ) { - global $wgCacheDirectory; - - $this->conf = $conf; - $this->logger = LoggerFactory::getInstance( 'localisation' ); - - $directory = !empty( $conf['storeDirectory'] ) ? $conf['storeDirectory'] : $wgCacheDirectory; - $storeArg = []; - $storeArg['directory'] = $directory; - - if ( !empty( $conf['storeClass'] ) ) { - $storeClass = $conf['storeClass']; - } else { - switch ( $conf['store'] ) { - case 'files': - case 'file': - $storeClass = LCStoreCDB::class; - break; - case 'db': - $storeClass = LCStoreDB::class; - $storeArg['server'] = $conf['storeServer'] ?? []; - break; - case 'array': - $storeClass = LCStoreStaticArray::class; - break; - case 'detect': - if ( $directory ) { - $storeClass = LCStoreCDB::class; - } else { - $storeClass = LCStoreDB::class; - $storeArg['server'] = $conf['storeServer'] ?? []; - } - break; - default: - throw new MWException( - 'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.' - ); - } - } - $this->logger->debug( static::class . ": using store $storeClass" ); - - $this->store = new $storeClass( $storeArg ); - foreach ( [ 'manualRecache', 'forceRecache' ] as $var ) { - if ( isset( $conf[$var] ) ) { - $this->$var = $conf[$var]; - } - } + function __construct( + ServiceOptions $options, + LCStore $store, + LoggerInterface $logger, + array $clearStoreCallbacks, + LanguageNameUtils $langNameUtils + ) { + $options->assertRequiredOptions( self::$constructorOptions ); + + $this->options = $options; + $this->store = $store; + $this->logger = $logger; + $this->clearStoreCallbacks = $clearStoreCallbacks; + $this->langNameUtils = $langNameUtils; + + // Keep this separate from $this->options so it can be mutable + $this->manualRecache = $options->get( 'manualRecache' ); } /** @@ -406,7 +400,7 @@ class LocalisationCache { * @return bool */ public function isExpired( $code ) { - if ( $this->forceRecache && !isset( $this->recachedLangs[$code] ) ) { + if ( $this->options->get( 'forceRecache' ) && !isset( $this->recachedLangs[$code] ) ) { $this->logger->debug( __METHOD__ . "($code): forced reload" ); return true; @@ -451,7 +445,7 @@ class LocalisationCache { $this->initialisedLangs[$code] = true; # If the code is of the wrong form for a Messages*.php file, do a shallow fallback - if ( !Language::isValidBuiltInCode( $code ) ) { + if ( !$this->langNameUtils->isValidBuiltInCode( $code ) ) { $this->initShallowFallback( $code, 'en' ); return; @@ -459,7 +453,7 @@ class LocalisationCache { # Recache the data if necessary if ( !$this->manualRecache && $this->isExpired( $code ) ) { - if ( Language::isSupportedLanguage( $code ) ) { + if ( $this->langNameUtils->isSupportedLanguage( $code ) ) { $this->recache( $code ); } elseif ( $code === 'en' ) { throw new MWException( 'MessagesEn.php is missing.' ); @@ -697,7 +691,7 @@ class LocalisationCache { global $IP; // This reads in the PHP i18n file with non-messages l10n data - $fileName = Language::getMessagesFileName( $code ); + $fileName = $this->langNameUtils->getMessagesFileName( $code ); if ( !file_exists( $fileName ) ) { $data = []; } else { @@ -804,14 +798,12 @@ class LocalisationCache { public function getMessagesDirs() { global $IP; - $config = MediaWikiServices::getInstance()->getMainConfig(); - $messagesDirs = $config->get( 'MessagesDirs' ); return [ 'core' => "$IP/languages/i18n", 'exif' => "$IP/languages/i18n/exif", 'api' => "$IP/includes/api/i18n", 'oojs-ui' => "$IP/resources/lib/ooui/i18n", - ] + $messagesDirs; + ] + $this->options->get( 'MessagesDirs' ); } /** @@ -821,8 +813,6 @@ class LocalisationCache { * @throws MWException */ public function recache( $code ) { - global $wgExtensionMessagesFiles; - if ( !$code ) { throw new MWException( "Invalid language code requested" ); } @@ -874,7 +864,7 @@ class LocalisationCache { # Load non-JSON localisation data for extensions $extensionData = array_fill_keys( $codeSequence, $initialData ); - foreach ( $wgExtensionMessagesFiles as $extension => $fileName ) { + foreach ( $this->options->get( 'ExtensionMessagesFiles' ) as $extension => $fileName ) { if ( isset( $messageDirs[$extension] ) ) { # This extension has JSON message data; skip the PHP shim continue; @@ -1038,8 +1028,9 @@ class LocalisationCache { # HACK: If using a null (i.e. disabled) storage backend, we # can't write to the MessageBlobStore either if ( !$this->store instanceof LCStoreNull ) { - $blobStore = MediaWikiServices::getInstance()->getResourceLoader()->getMessageBlobStore(); - $blobStore->clear(); + foreach ( $this->clearStoreCallbacks as $callback ) { + $callback(); + } } } @@ -1100,5 +1091,4 @@ class LocalisationCache { $this->store = new LCStoreNull; $this->manualRecache = false; } - } diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index e2b35a8632..78078770b2 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -232,6 +232,13 @@ class ChangesList extends ContextSource { $classes[] = Sanitizer::escapeClass( self::CSS_CLASS_PREFIX . 'ns-' . $rc->mAttribs['rc_namespace'] ); + $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo(); + $classes[] = Sanitizer::escapeClass( + self::CSS_CLASS_PREFIX . + 'ns-' . + ( $nsInfo->isTalk( $rc->mAttribs['rc_namespace'] ) ? 'talk' : 'subject' ) + ); + if ( $this->filterGroups !== null ) { foreach ( $this->filterGroups as $filterGroup ) { foreach ( $filterGroup->getFilters() as $filter ) { diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index 95c9fa6c63..c3b472845e 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -20,6 +20,7 @@ * @file */ use MediaWiki\ChangeTags\Taggable; +use MediaWiki\MediaWikiServices; /** * Utility class for creating new RC entries @@ -608,8 +609,9 @@ class RecentChange implements Taggable { } // Users without the 'autopatrol' right can't patrol their // own revisions - if ( $user->getName() === $this->getAttribute( 'rc_user_text' ) - && !$user->isAllowed( 'autopatrol' ) + if ( $user->getName() === $this->getAttribute( 'rc_user_text' ) && + !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'autopatrol' ) ) { $errors[] = [ 'markedaspatrollederror-noautopatrol' ]; } @@ -857,6 +859,7 @@ class RecentChange implements Taggable { $type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '', $revId = 0, $isPatrollable = false ) { global $wgRequest; + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); # # Get pageStatus for email notification switch ( $type . '-' . $action ) { @@ -881,7 +884,8 @@ class RecentChange implements Taggable { } // Allow unpatrolled status for patrollable log entries - $markPatrolled = $isPatrollable ? $user->isAllowed( 'autopatrol' ) : true; + $canAutopatrol = $permissionManager->userHasRight( $user, 'autopatrol' ); + $markPatrolled = $isPatrollable ? $canAutopatrol : true; $rc = new RecentChange; $rc->mTitle = $target; @@ -902,7 +906,8 @@ class RecentChange implements Taggable { 'rc_comment_data' => null, 'rc_this_oldid' => $revId, 'rc_last_oldid' => 0, - 'rc_bot' => $user->isAllowed( 'bot' ) ? (int)$wgRequest->getBool( 'bot', true ) : 0, + 'rc_bot' => $permissionManager->userHasRight( $user, 'bot' ) ? + (int)$wgRequest->getBool( 'bot', true ) : 0, 'rc_ip' => self::checkIPAddress( $ip ), 'rc_patrolled' => $markPatrolled ? self::PRC_AUTOPATROLLED : self::PRC_UNPATROLLED, 'rc_new' => 0, # obsolete diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 8c8125b0fb..30c2f7a428 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -126,7 +126,7 @@ class ChangeTags { $markers = $context->msg( 'tag-list-wrapper' ) ->numParams( count( $displayTags ) ) - ->rawParams( $context->getLanguage()->commaList( $displayTags ) ) + ->rawParams( implode( ' ', $displayTags ) ) ->parse(); $markers = Xml::tags( 'span', [ 'class' => 'mw-tag-markers' ], $markers ); @@ -520,7 +520,9 @@ class ChangeTags { */ public static function canAddTagsAccompanyingChange( array $tags, User $user = null ) { if ( !is_null( $user ) ) { - if ( !$user->isAllowed( 'applychangetags' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'applychangetags' ) + ) { return Status::newFatal( 'tags-apply-no-permission' ); } elseif ( $user->getBlock() ) { // @TODO Ensure that the block does not apply to the `applychangetags` @@ -595,7 +597,9 @@ class ChangeTags { User $user = null ) { if ( !is_null( $user ) ) { - if ( !$user->isAllowed( 'changetags' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'changetags' ) + ) { return Status::newFatal( 'tags-update-no-permission' ); } elseif ( $user->getBlock() ) { // @TODO Ensure that the block does not apply to the `changetags` @@ -1015,7 +1019,9 @@ class ChangeTags { */ public static function canActivateTag( $tag, User $user = null ) { if ( !is_null( $user ) ) { - if ( !$user->isAllowed( 'managechangetags' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'managechangetags' ) + ) { return Status::newFatal( 'tags-manage-no-permission' ); } elseif ( $user->getBlock() ) { // @TODO Ensure that the block does not apply to the `managechangetags` @@ -1089,7 +1095,9 @@ class ChangeTags { */ public static function canDeactivateTag( $tag, User $user = null ) { if ( !is_null( $user ) ) { - if ( !$user->isAllowed( 'managechangetags' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'managechangetags' ) + ) { return Status::newFatal( 'tags-manage-no-permission' ); } elseif ( $user->getBlock() ) { // @TODO Ensure that the block does not apply to the `managechangetags` @@ -1188,7 +1196,9 @@ class ChangeTags { */ public static function canCreateTag( $tag, User $user = null ) { if ( !is_null( $user ) ) { - if ( !$user->isAllowed( 'managechangetags' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'managechangetags' ) + ) { return Status::newFatal( 'tags-manage-no-permission' ); } elseif ( $user->getBlock() ) { // @TODO Ensure that the block does not apply to the `managechangetags` @@ -1308,7 +1318,9 @@ class ChangeTags { $tagUsage = self::tagUsageStatistics(); if ( !is_null( $user ) ) { - if ( !$user->isAllowed( 'deletechangetags' ) ) { + if ( !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'deletechangetags' ) + ) { return Status::newFatal( 'tags-delete-no-permission' ); } elseif ( $user->getBlock() ) { // @TODO Ensure that the block does not apply to the `deletechangetags` @@ -1566,6 +1578,8 @@ class ChangeTags { * @return bool */ public static function showTagEditingUI( User $user ) { - return $user->isAllowed( 'changetags' ) && (bool)self::listExplicitlyDefinedTags(); + return MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'changetags' ) && + (bool)self::listExplicitlyDefinedTags(); } } diff --git a/includes/content/AbstractContent.php b/includes/content/AbstractContent.php index c82b4734ca..eb9ef850b4 100644 --- a/includes/content/AbstractContent.php +++ b/includes/content/AbstractContent.php @@ -529,7 +529,7 @@ abstract class AbstractContent implements Content { * @since 1.24 * * @param Title $title Context title for parsing - * @param int|null $revId Revision ID (for {{REVISIONID}}) + * @param int|null $revId Revision ID being rendered * @param ParserOptions|null $options * @param bool $generateHtml Whether or not to generate HTML * @@ -575,7 +575,8 @@ abstract class AbstractContent implements Content { * @since 1.24 * * @param Title $title Context title for parsing - * @param int|null $revId Revision ID (for {{REVISIONID}}) + * @param int|null $revId ID of the revision being rendered. + * See Parser::parse() for the ramifications. * @param ParserOptions $options * @param bool $generateHtml Whether or not to generate HTML * @param ParserOutput &$output The output object to fill (reference). diff --git a/includes/content/Content.php b/includes/content/Content.php index 2637aa6929..8596619d13 100644 --- a/includes/content/Content.php +++ b/includes/content/Content.php @@ -269,7 +269,8 @@ interface Content { * may call ParserOutput::recordOption() on the output object. * * @param Title $title The page title to use as a context for rendering. - * @param int|null $revId Optional revision ID being rendered. + * @param int|null $revId ID of the revision being rendered. + * See Parser::parse() for the ramifications. (default: null) * @param ParserOptions|null $options Any parser options. * @param bool $generateHtml Whether to generate HTML (default: true). If false, * the result of calling getText() on the ParserOutput object returned by diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index 48dfc70090..ea5ab78bc0 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -1077,7 +1077,8 @@ abstract class ContentHandler { } // Max content length = max comment length - length of the comment (excl. $1) - $text = $content ? $content->getTextForSummary( 255 - ( strlen( $reason ) - 2 ) ) : ''; + $maxLength = CommentStore::COMMENT_CHARACTER_LIMIT - ( strlen( $reason ) - 2 ); + $text = $content ? $content->getTextForSummary( $maxLength ) : ''; // Now replace the '$1' placeholder $reason = str_replace( '$1', $text, $reason ); diff --git a/includes/content/WikitextContent.php b/includes/content/WikitextContent.php index 8e5e0a8305..70b638b4b4 100644 --- a/includes/content/WikitextContent.php +++ b/includes/content/WikitextContent.php @@ -329,7 +329,8 @@ class WikitextContent extends TextContent { * using the global Parser service. * * @param Title $title - * @param int|null $revId Revision to pass to the parser (default: null) + * @param int|null $revId ID of the revision being rendered. + * See Parser::parse() for the ramifications. (default: null) * @param ParserOptions $options (default: null) * @param bool $generateHtml (default: true) * @param ParserOutput &$output ParserOutput representing the HTML form of the text, diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index cdf0f797df..df5f1151b3 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -93,9 +93,7 @@ class CloneDatabase { // Postgres: Temp tables are automatically deleted upon end of session // Same Temp table name hides existing table for current session - if ( $this->dropCurrentTables - && !in_array( $this->db->getType(), [ 'oracle' ] ) - ) { + if ( $this->dropCurrentTables ) { if ( $oldTableName === $newTableName ) { // Last ditch check to avoid data loss throw new LogicException( "Not dropping new table, as '$newTableName'" diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php deleted file mode 100644 index 82fff6b196..0000000000 --- a/includes/db/DatabaseOracle.php +++ /dev/null @@ -1,1387 +0,0 @@ - alternate table name) */ - private $keywordTableMap = []; - - /** - * @see Database::__construct() - * @param array $params Additional parameters include: - * - keywordTableMap : Map of reserved table names to alternative table names to use - */ - public function __construct( array $params ) { - $this->keywordTableMap = $params['keywordTableMap'] ?? []; - $params['tablePrefix'] = strtoupper( $params['tablePrefix'] ); - parent::__construct( $params ); - } - - function __destruct() { - if ( $this->conn ) { - AtEase::suppressWarnings(); - $this->close(); - AtEase::restoreWarnings(); - } - } - - function getType() { - return 'oracle'; - } - - function implicitOrderby() { - return false; - } - - protected function open( $server, $user, $password, $dbName, $schema, $tablePrefix ) { - if ( !function_exists( 'oci_connect' ) ) { - throw $this->newExceptionAfterConnectError( - "Oracle functions missing, have you compiled PHP with the --with-oci8 option?\n " . - "(Note: if you recently installed PHP, you may need to restart your webserver\n " . - "and database)" - ); - } - - $this->close(); - - if ( $schema !== null ) { - // This uses the *database* aspect of $domain for schema, not the domain schema - throw $this->newExceptionAfterConnectError( - "Got schema '$schema'; not supported. " . - "The database component '$dbName' is actually interpreted as the Oracle schema." - ); - } - - $this->user = $user; - $this->password = $password; - if ( strlen( $server ) ) { - // Transparent Network Substrate (TNS) endpoint - $this->server = $server; - // Database name, defaulting to the user name - $realDatabase = strlen( $dbName ) ? $dbName : $user; - } else { - // Backward compatibility; $server used to be null and $dbName was the TNS - $this->server = $dbName; - $realDatabase = $user; - } - $session_mode = ( $this->flags & DBO_SYSDBA ) ? OCI_SYSDBA : OCI_DEFAULT; - - $this->installErrorHandler(); - try { - $this->conn = $this->getFlag( DBO_PERSISTENT ) - ? oci_pconnect( - $this->user, - $this->password, - $this->server, - $this->defaultCharset, - $session_mode - ) - : oci_new_connect( - $this->user, - $this->password, - $this->server, - $this->defaultCharset, - $session_mode - ); - } catch ( Exception $e ) { - $this->restoreErrorHandler(); - throw $this->newExceptionAfterConnectError( $e->getMessage() ); - } - $error = $this->restoreErrorHandler(); - - if ( !$this->conn ) { - throw $this->newExceptionAfterConnectError( $error ?: $this->lastError() ); - } - - try { - if ( $this->user != $realDatabase ) { - // Change current schema for the entire session - $this->selectDomain( new DatabaseDomain( - $realDatabase, - $this->currentDomain->getSchema(), - $this->currentDomain->getTablePrefix() - ) ); - } else { - $this->currentDomain = new DatabaseDomain( $realDatabase, null, $tablePrefix ); - } - $set = [ - 'NLS_TIMESTAMP_FORMAT' => 'DD-MM-YYYY HH24:MI:SS.FF6', - 'NLS_TIMESTAMP_TZ_FORMAT' => 'DD-MM-YYYY HH24:MI:SS.FF6', - 'NLS_NUMERIC_CHARACTERS' => '.,' - ]; - foreach ( $set as $var => $val ) { - $this->query( - "ALTER SESSION SET {$var}=" . $this->addQuotes( $val ), - __METHOD__, - self::QUERY_IGNORE_DBO_TRX | self::QUERY_NO_RETRY - ); - } - } catch ( Exception $e ) { - throw $this->newExceptionAfterConnectError( $e->getMessage() ); - } - } - - /** - * Closes a database connection, if it is open - * Returns success, true if already closed - * @return bool - */ - protected function closeConnection() { - return oci_close( $this->conn ); - } - - function execFlags() { - return $this->trxLevel() ? OCI_NO_AUTO_COMMIT : OCI_COMMIT_ON_SUCCESS; - } - - /** - * @param string $sql - * @return bool|mixed|ORAResult - */ - protected function doQuery( $sql ) { - if ( !mb_check_encoding( (string)$sql, 'UTF-8' ) ) { - throw new DBUnexpectedError( $this, "SQL encoding is invalid\n$sql" ); - } - - // handle some oracle specifics - // remove AS column/table/subquery namings - if ( !$this->getFlag( DBO_DDLMODE ) ) { - $sql = preg_replace( '/ as /i', ' ', $sql ); - } - - // Oracle has issues with UNION clause if the statement includes LOB fields - // So we do a UNION ALL and then filter the results array with array_unique - $union_unique = ( preg_match( '/\/\* UNION_UNIQUE \*\/ /', $sql ) != 0 ); - // EXPLAIN syntax in Oracle is EXPLAIN PLAN FOR and it return nothing - // you have to select data from plan table after explain - $explain_id = MWTimestamp::getLocalInstance()->format( 'dmYHis' ); - - $sql = preg_replace( - '/^EXPLAIN /', - 'EXPLAIN PLAN SET STATEMENT_ID = \'' . $explain_id . '\' FOR', - $sql, - 1, - $explain_count - ); - - Wikimedia\suppressWarnings(); - - $this->mLastResult = $stmt = oci_parse( $this->conn, $sql ); - if ( $stmt === false ) { - $e = oci_error( $this->conn ); - $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ ); - - return false; - } - - if ( !oci_execute( $stmt, $this->execFlags() ) ) { - $e = oci_error( $stmt ); - if ( !$this->ignoreDupValOnIndex || $e['code'] != '1' ) { - $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ ); - - return false; - } - } - - Wikimedia\restoreWarnings(); - - if ( $explain_count > 0 ) { - return $this->doQuery( 'SELECT id, cardinality "ROWS" FROM plan_table ' . - 'WHERE statement_id = \'' . $explain_id . '\'' ); - } elseif ( oci_statement_type( $stmt ) == 'SELECT' ) { - return new ORAResult( $this, $stmt, $union_unique ); - } else { - $this->mAffectedRows = oci_num_rows( $stmt ); - - return true; - } - } - - function queryIgnore( $sql, $fname = '' ) { - return $this->query( $sql, $fname, true ); - } - - /** - * Frees resources associated with the LOB descriptor - * @param IResultWrapper|ORAResult $res - */ - function freeResult( $res ) { - ResultWrapper::unwrap( $res )->free(); - } - - /** - * @param IResultWrapper|ORAResult $res - * @return stdClass|bool - */ - function fetchObject( $res ) { - return ResultWrapper::unwrap( $res )->fetchObject(); - } - - /** - * @param IResultWrapper|ORAResult $res - * @return stdClass|bool - */ - function fetchRow( $res ) { - return ResultWrapper::unwrap( $res )->fetchRow(); - } - - /** - * @param IResultWrapper|ORAResult $res - * @return int - */ - function numRows( $res ) { - return ResultWrapper::unwrap( $res )->numRows(); - } - - /** - * @param IResultWrapper|ORAResult $res - * @return int - */ - function numFields( $res ) { - return ResultWrapper::unwrap( $res )->numFields(); - } - - function fieldName( $stmt, $n ) { - return oci_field_name( $stmt, $n ); - } - - function insertId() { - $res = $this->query( "SELECT lastval_pkg.getLastval FROM dual" ); - $row = $this->fetchRow( $res ); - return is_null( $row[0] ) ? null : (int)$row[0]; - } - - /** - * @param mixed $res - * @param int $row - */ - function dataSeek( $res, $row ) { - if ( $res instanceof ORAResult ) { - $res->seek( $row ); - } else { - ResultWrapper::unwrap( $res )->seek( $row ); - } - } - - function lastError() { - if ( $this->conn === false ) { - $e = oci_error(); - } else { - $e = oci_error( $this->conn ); - } - - return $e['message']; - } - - function lastErrno() { - if ( $this->conn === false ) { - $e = oci_error(); - } else { - $e = oci_error( $this->conn ); - } - - return $e['code']; - } - - protected function fetchAffectedRowCount() { - return $this->mAffectedRows; - } - - /** - * Returns information about an index - * If errors are explicitly ignored, returns NULL on failure - * @param string $table - * @param string $index - * @param string $fname - * @return bool - */ - function indexInfo( $table, $index, $fname = __METHOD__ ) { - return false; - } - - function indexUnique( $table, $index, $fname = __METHOD__ ) { - return false; - } - - function insert( $table, $a, $fname = __METHOD__, $options = [] ) { - if ( !count( $a ) ) { - return true; - } - - if ( !is_array( $options ) ) { - $options = [ $options ]; - } - - if ( in_array( 'IGNORE', $options ) ) { - $this->ignoreDupValOnIndex = true; - } - - if ( !is_array( reset( $a ) ) ) { - $a = [ $a ]; - } - - foreach ( $a as &$row ) { - $this->insertOneRow( $table, $row, $fname ); - } - - if ( in_array( 'IGNORE', $options ) ) { - $this->ignoreDupValOnIndex = false; - } - - return true; - } - - private function fieldBindStatement( $table, $col, &$val, $includeCol = false ) { - $col_info = $this->fieldInfoMulti( $table, $col ); - $col_type = $col_info != false ? $col_info->type() : 'CONSTANT'; - - $bind = ''; - if ( is_numeric( $col ) ) { - $bind = $val; - $val = null; - - return $bind; - } elseif ( $includeCol ) { - $bind = "$col = "; - } - - if ( $val == '' && $val !== 0 && $col_type != 'BLOB' && $col_type != 'CLOB' ) { - $val = null; - } - - if ( $val === 'NULL' ) { - $val = null; - } - - if ( $val === null ) { - if ( - $col_info != false && - $col_info->isNullable() == 0 && - $col_info->defaultValue() != null - ) { - $bind .= 'DEFAULT'; - } else { - $bind .= 'NULL'; - } - } else { - $bind .= ':' . $col; - } - - return $bind; - } - - /** - * @param string $table - * @param array $row - * @param string $fname - * @return bool - * @throws DBUnexpectedError - */ - private function insertOneRow( $table, $row, $fname ) { - $table = $this->tableName( $table ); - // "INSERT INTO tables (a, b, c)" - $sql = "INSERT INTO " . $table . " (" . implode( ',', array_keys( $row ) ) . ')'; - $sql .= " VALUES ("; - - // for each value, append ":key" - $first = true; - foreach ( $row as $col => &$val ) { - if ( !$first ) { - $sql .= ', '; - } else { - $first = false; - } - if ( $this->isQuotedIdentifier( $val ) ) { - $sql .= $this->removeIdentifierQuotes( $val ); - unset( $row[$col] ); - } else { - $sql .= $this->fieldBindStatement( $table, $col, $val ); - } - } - $sql .= ')'; - - $this->mLastResult = $stmt = oci_parse( $this->conn, $sql ); - if ( $stmt === false ) { - $e = oci_error( $this->conn ); - $this->reportQueryError( $e['message'], $e['code'], $sql, $fname ); - - return false; - } - foreach ( $row as $col => &$val ) { - $col_info = $this->fieldInfoMulti( $table, $col ); - $col_type = $col_info != false ? $col_info->type() : 'CONSTANT'; - - if ( $val === null ) { - // do nothing ... null was inserted in statement creation - } elseif ( $col_type != 'BLOB' && $col_type != 'CLOB' ) { - if ( is_object( $val ) ) { - $val = $val->fetch(); - } - - // backward compatibility - if ( - preg_match( '/^timestamp.*/i', $col_type ) == 1 && - strtolower( $val ) == 'infinity' - ) { - $val = $this->getInfinity(); - } - - $val = $this->getVerifiedUTF8( $val ); - if ( oci_bind_by_name( $stmt, ":$col", $val, -1, SQLT_CHR ) === false ) { - $e = oci_error( $stmt ); - $this->reportQueryError( $e['message'], $e['code'], $sql, $fname ); - - return false; - } - } else { - /** @var OCI_Lob[] $lob */ - $lob[$col] = oci_new_descriptor( $this->conn, OCI_D_LOB ); - if ( $lob[$col] === false ) { - $e = oci_error( $stmt ); - throw new DBUnexpectedError( - $this, - "Cannot create LOB descriptor: " . $e['message'] - ); - } - - if ( is_object( $val ) ) { - $val = $val->fetch(); - } - - if ( $col_type == 'BLOB' ) { - $lob[$col]->writeTemporary( $val, OCI_TEMP_BLOB ); - oci_bind_by_name( $stmt, ":$col", $lob[$col], -1, OCI_B_BLOB ); - } else { - $lob[$col]->writeTemporary( $val, OCI_TEMP_CLOB ); - oci_bind_by_name( $stmt, ":$col", $lob[$col], -1, OCI_B_CLOB ); - } - } - } - - Wikimedia\suppressWarnings(); - - if ( oci_execute( $stmt, $this->execFlags() ) === false ) { - $e = oci_error( $stmt ); - if ( !$this->ignoreDupValOnIndex || $e['code'] != '1' ) { - $this->reportQueryError( $e['message'], $e['code'], $sql, $fname ); - - return false; - } else { - $this->mAffectedRows = oci_num_rows( $stmt ); - } - } else { - $this->mAffectedRows = oci_num_rows( $stmt ); - } - - Wikimedia\restoreWarnings(); - - if ( isset( $lob ) ) { - foreach ( $lob as $lob_v ) { - $lob_v->free(); - } - } - - if ( !$this->trxLevel() ) { - oci_commit( $this->conn ); - } - - return oci_free_statement( $stmt ); - } - - function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds, $fname = __METHOD__, - $insertOptions = [], $selectOptions = [], $selectJoinConds = [] - ) { - $destTable = $this->tableName( $destTable ); - - $sequenceData = $this->getSequenceData( $destTable ); - if ( $sequenceData !== false && - !isset( $varMap[$sequenceData['column']] ) - ) { - $varMap[$sequenceData['column']] = - 'GET_SEQUENCE_VALUE(\'' . $sequenceData['sequence'] . '\')'; - } - - // count-alias subselect fields to avoid abigious definition errors - $i = 0; - foreach ( $varMap as &$val ) { - $val .= ' field' . $i; - $i++; - } - - $selectSql = $this->selectSQLText( - $srcTable, - array_values( $varMap ), - $conds, - $fname, - $selectOptions, - $selectJoinConds - ); - - $sql = "INSERT INTO $destTable (" . - implode( ',', array_keys( $varMap ) ) . ') ' . $selectSql; - - if ( in_array( 'IGNORE', $insertOptions ) ) { - $this->ignoreDupValOnIndex = true; - } - - $this->query( $sql, $fname ); - - if ( in_array( 'IGNORE', $insertOptions ) ) { - $this->ignoreDupValOnIndex = false; - } - } - - public function upsert( $table, array $rows, $uniqueIndexes, array $set, - $fname = __METHOD__ - ) { - if ( $rows === [] ) { - return true; // nothing to do - } - - if ( !is_array( reset( $rows ) ) ) { - $rows = [ $rows ]; - } - - $sequenceData = $this->getSequenceData( $table ); - if ( $sequenceData !== false ) { - // add sequence column to each list of columns, when not set - foreach ( $rows as &$row ) { - if ( !isset( $row[$sequenceData['column']] ) ) { - $row[$sequenceData['column']] = - $this->addIdentifierQuotes( 'GET_SEQUENCE_VALUE(\'' . - $sequenceData['sequence'] . '\')' ); - } - } - } - - return parent::upsert( $table, $rows, $uniqueIndexes, $set, $fname ); - } - - public function tableName( $name, $format = 'quoted' ) { - // Replace reserved words with better ones - $name = $this->remappedTableName( $name ); - - return strtoupper( parent::tableName( $name, $format ) ); - } - - /** - * @param string $name - * @return string Value of $name or remapped name if $name is a reserved keyword - */ - public function remappedTableName( $name ) { - return $this->keywordTableMap[$name] ?? $name; - } - - function tableNameInternal( $name ) { - $name = $this->tableName( $name ); - - return preg_replace( '/.*\.(.*)/', '$1', $name ); - } - - /** - * Return sequence_name if table has a sequence - * - * @param string $table - * @return string[]|bool - */ - private function getSequenceData( $table ) { - if ( $this->sequenceData == null ) { - $dbname = $this->currentDomain->getDatabase(); - $prefix = $this->currentDomain->getTablePrefix(); - // See https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions040.htm - $decodeArgs = [ 'atc.table_name' ]; // the switch - foreach ( $this->keywordTableMap as $reserved => $alternative ) { - $search = strtoupper( $prefix . $alternative ); // case - $replace = strtoupper( $prefix . $reserved ); // result - $decodeArgs[] = $this->addQuotes( $search ); - $decodeArgs[] = $this->addQuotes( $replace ); - } - $decodeArgs[] = [ 'atc.table_name' ]; // default - $decodeArgs = implode( ', ', $decodeArgs ); - - $result = $this->doQuery( - "SELECT lower(asq.sequence_name), lower(atc.table_name), lower(atc.column_name) - FROM all_sequences asq, all_tab_columns atc - WHERE decode({$decodeArgs}) || '_' || - atc.column_name || '_SEQ' = '{$prefix}' || asq.sequence_name - AND asq.sequence_owner = upper('{$dbname}') - AND atc.owner = upper('{$dbname}')" - ); - - while ( ( $row = $result->fetchRow() ) !== false ) { - $this->sequenceData[$row[1]] = [ - 'sequence' => $row[0], - 'column' => $row[2] - ]; - } - } - $table = strtolower( $this->removeIdentifierQuotes( $this->tableName( $table ) ) ); - - return $this->sequenceData[$table] ?? false; - } - - /** - * Returns the size of a text field, or -1 for "unlimited" - * - * @param string $table - * @param string $field - * @return mixed - */ - function textFieldSize( $table, $field ) { - $fieldInfoData = $this->fieldInfo( $table, $field ); - - return $fieldInfoData->maxLength(); - } - - function limitResult( $sql, $limit, $offset = false ) { - if ( $offset === false ) { - $offset = 0; - } - - return "SELECT * FROM ($sql) WHERE rownum >= (1 + $offset) AND rownum < (1 + $limit + $offset)"; - } - - function encodeBlob( $b ) { - return new Blob( $b ); - } - - function unionQueries( $sqls, $all ) { - $glue = ' UNION ALL '; - - return 'SELECT * ' . ( $all ? '' : '/* UNION_UNIQUE */ ' ) . - 'FROM (' . implode( $glue, $sqls ) . ')'; - } - - function wasDeadlock() { - return $this->lastErrno() == 'OCI-00060'; - } - - function duplicateTableStructure( $oldName, $newName, $temporary = false, - $fname = __METHOD__ - ) { - $temporary = $temporary ? 'TRUE' : 'FALSE'; - $tablePrefix = $this->currentDomain->getTablePrefix(); - - $newName = strtoupper( $newName ); - $oldName = strtoupper( $oldName ); - - $tabName = substr( $newName, strlen( $tablePrefix ) ); - $oldPrefix = substr( $oldName, 0, strlen( $oldName ) - strlen( $tabName ) ); - $newPrefix = strtoupper( $tablePrefix ); - - return $this->doQuery( "BEGIN DUPLICATE_TABLE( '$tabName', " . - "'$oldPrefix', '$newPrefix', $temporary ); END;" ); - } - - function listTables( $prefix = null, $fname = __METHOD__ ) { - $listWhere = ''; - if ( !empty( $prefix ) ) { - $listWhere = ' AND table_name LIKE \'' . strtoupper( $prefix ) . '%\''; - } - - $owner = strtoupper( $this->getDBname() ); - $result = $this->doQuery( "SELECT table_name FROM all_tables " . - "WHERE owner='$owner' AND table_name NOT LIKE '%!_IDX\$_' ESCAPE '!' $listWhere" ); - - // dirty code ... i know - $endArray = []; - $endArray[] = strtoupper( $prefix . 'MWUSER' ); - $endArray[] = strtoupper( $prefix . 'PAGE' ); - $endArray[] = strtoupper( $prefix . 'IMAGE' ); - $fixedOrderTabs = $endArray; - while ( ( $row = $result->fetchRow() ) !== false ) { - if ( !in_array( $row['table_name'], $fixedOrderTabs ) ) { - $endArray[] = $row['table_name']; - } - } - - return $endArray; - } - - public function dropTable( $tableName, $fName = __METHOD__ ) { - $tableName = $this->tableName( $tableName ); - if ( !$this->tableExists( $tableName ) ) { - return false; - } - - return $this->doQuery( "DROP TABLE $tableName CASCADE CONSTRAINTS PURGE" ); - } - - public function timestamp( $ts = 0 ) { - $t = new ConvertibleTimestamp( $ts ); - // Let errors bubble up to avoid putting garbage in the DB - return $t->getTimestamp( TS_ORACLE ); - } - - /** - * Return aggregated value function call - * - * @param array $valuedata - * @param string $valuename - * @return mixed - */ - public function aggregateValue( $valuedata, $valuename = 'value' ) { - return $valuedata; - } - - /** - * @return string Wikitext of a link to the server software's web site - */ - public function getSoftwareLink() { - return '[{{int:version-db-oracle-url}} Oracle]'; - } - - /** - * @return string Version information from the database - */ - function getServerVersion() { - // better version number, fallback on driver - $rset = $this->doQuery( - 'SELECT version FROM product_component_version ' . - 'WHERE UPPER(product) LIKE \'ORACLE DATABASE%\'' - ); - $row = $rset->fetchRow(); - if ( !$row ) { - return oci_server_version( $this->conn ); - } - - return $row['version']; - } - - /** - * Query whether a given index exists - * @param string $table - * @param string $index - * @param string $fname - * @return bool - */ - function indexExists( $table, $index, $fname = __METHOD__ ) { - $table = $this->tableName( $table ); - $table = strtoupper( $this->removeIdentifierQuotes( $table ) ); - $index = strtoupper( $index ); - $owner = strtoupper( $this->getDBname() ); - $sql = "SELECT 1 FROM all_indexes WHERE owner='$owner' AND index_name='{$table}_{$index}'"; - $res = $this->doQuery( $sql ); - if ( $res ) { - $count = $res->numRows(); - $res->free(); - } else { - $count = 0; - } - - return $count != 0; - } - - /** - * Query whether a given table exists (in the given schema, or the default mw one if not given) - * @param string $table - * @param string $fname - * @return bool - */ - function tableExists( $table, $fname = __METHOD__ ) { - $table = $this->tableName( $table ); - $table = $this->addQuotes( strtoupper( $this->removeIdentifierQuotes( $table ) ) ); - $owner = $this->addQuotes( strtoupper( $this->getDBname() ) ); - $sql = "SELECT 1 FROM all_tables WHERE owner=$owner AND table_name=$table"; - $res = $this->doQuery( $sql ); - if ( $res && $res->numRows() > 0 ) { - $exists = true; - } else { - $exists = false; - } - - $res->free(); - - return $exists; - } - - /** - * Function translates mysql_fetch_field() functionality on ORACLE. - * Caching is present for reducing query time. - * For internal calls. Use fieldInfo for normal usage. - * Returns false if the field doesn't exist - * - * @param array|string $table - * @param string $field - * @return ORAField|ORAResult|false - */ - private function fieldInfoMulti( $table, $field ) { - $field = strtoupper( $field ); - if ( is_array( $table ) ) { - $table = array_map( [ $this, 'tableNameInternal' ], $table ); - $tableWhere = 'IN ('; - foreach ( $table as &$singleTable ) { - $singleTable = $this->removeIdentifierQuotes( $singleTable ); - if ( isset( $this->mFieldInfoCache["$singleTable.$field"] ) ) { - return $this->mFieldInfoCache["$singleTable.$field"]; - } - $tableWhere .= '\'' . $singleTable . '\','; - } - $tableWhere = rtrim( $tableWhere, ',' ) . ')'; - } else { - $table = $this->removeIdentifierQuotes( $this->tableNameInternal( $table ) ); - if ( isset( $this->mFieldInfoCache["$table.$field"] ) ) { - return $this->mFieldInfoCache["$table.$field"]; - } - $tableWhere = '= \'' . $table . '\''; - } - - $fieldInfoStmt = oci_parse( - $this->conn, - 'SELECT * FROM wiki_field_info_full WHERE table_name ' . - $tableWhere . ' and column_name = \'' . $field . '\'' - ); - if ( oci_execute( $fieldInfoStmt, $this->execFlags() ) === false ) { - $e = oci_error( $fieldInfoStmt ); - $this->reportQueryError( $e['message'], $e['code'], 'fieldInfo QUERY', __METHOD__ ); - - return false; - } - $res = new ORAResult( $this, $fieldInfoStmt ); - if ( $res->numRows() == 0 ) { - if ( is_array( $table ) ) { - foreach ( $table as &$singleTable ) { - $this->mFieldInfoCache["$singleTable.$field"] = false; - } - } else { - $this->mFieldInfoCache["$table.$field"] = false; - } - $fieldInfoTemp = null; - } else { - $fieldInfoTemp = new ORAField( $res->fetchRow() ); - $table = $fieldInfoTemp->tableName(); - $this->mFieldInfoCache["$table.$field"] = $fieldInfoTemp; - } - $res->free(); - - return $fieldInfoTemp; - } - - /** - * @throws DBUnexpectedError - * @param string $table - * @param string $field - * @return ORAField - */ - function fieldInfo( $table, $field ) { - if ( is_array( $table ) ) { - throw new DBUnexpectedError( - $this, - 'DatabaseOracle::fieldInfo called with table array!' - ); - } - - return $this->fieldInfoMulti( $table, $field ); - } - - protected function doBegin( $fname = __METHOD__ ) { - $this->query( 'SET CONSTRAINTS ALL DEFERRED' ); - } - - protected function doCommit( $fname = __METHOD__ ) { - if ( $this->trxLevel() ) { - $ret = oci_commit( $this->conn ); - if ( !$ret ) { - throw new DBUnexpectedError( $this, $this->lastError() ); - } - $this->query( 'SET CONSTRAINTS ALL IMMEDIATE' ); - } - } - - protected function doRollback( $fname = __METHOD__ ) { - if ( $this->trxLevel() ) { - oci_rollback( $this->conn ); - $ignoreErrors = true; - $this->query( 'SET CONSTRAINTS ALL IMMEDIATE', $fname, $ignoreErrors ); - } - } - - function sourceStream( - $fp, - callable $lineCallback = null, - callable $resultCallback = null, - $fname = __METHOD__, callable $inputCallback = null - ) { - $cmd = ''; - $done = false; - $dollarquote = false; - - $replacements = []; - // Defines must comply with ^define\s*([^\s=]*)\s*=\s?'\{\$([^\}]*)\}'; - while ( !feof( $fp ) ) { - if ( $lineCallback ) { - $lineCallback(); - } - $line = trim( fgets( $fp, 1024 ) ); - $sl = strlen( $line ) - 1; - - if ( $sl < 0 ) { - continue; - } - if ( $line[0] == '-' && $line[1] == '-' ) { - continue; - } - - // Allow dollar quoting for function declarations - if ( substr( $line, 0, 8 ) == '/*$mw$*/' ) { - if ( $dollarquote ) { - $dollarquote = false; - $line = str_replace( '/*$mw$*/', '', $line ); // remove dollarquotes - $done = true; - } else { - $dollarquote = true; - } - } elseif ( !$dollarquote ) { - if ( $line[$sl] == ';' && ( $sl < 2 || $line[$sl - 1] != ';' ) ) { - $done = true; - $line = substr( $line, 0, $sl ); - } - } - - if ( $cmd != '' ) { - $cmd .= ' '; - } - $cmd .= "$line\n"; - - if ( $done ) { - $cmd = str_replace( ';;', ";", $cmd ); - if ( strtolower( substr( $cmd, 0, 6 ) ) == 'define' ) { - if ( preg_match( '/^define\s*([^\s=]*)\s*=\s*\'\{\$([^\}]*)\}\'/', $cmd, $defines ) ) { - $replacements[$defines[2]] = $defines[1]; - } - } else { - foreach ( $replacements as $mwVar => $scVar ) { - $cmd = str_replace( '&' . $scVar . '.', '`{$' . $mwVar . '}`', $cmd ); - } - - $cmd = $this->replaceVars( $cmd ); - if ( $inputCallback ) { - $inputCallback( $cmd ); - } - $res = $this->doQuery( $cmd ); - if ( $resultCallback ) { - call_user_func( $resultCallback, $res, $this ); - } - - if ( $res === false ) { - $err = $this->lastError(); - - return "Query \"{$cmd}\" failed with error code \"$err\".\n"; - } - } - - $cmd = ''; - $done = false; - } - } - - return true; - } - - protected function doSelectDomain( DatabaseDomain $domain ) { - if ( $domain->getSchema() !== null ) { - // We use the *database* aspect of $domain for schema, not the domain schema - throw new DBExpectedError( - $this, - __CLASS__ . ": domain '{$domain->getId()}' has a schema component; " . - "the database component is actually interpreted as the Oracle schema." - ); - } - - $database = $domain->getDatabase(); - if ( $database === null || $database === $this->user ) { - // Backward compatibility - $this->currentDomain = $domain; - - return true; - } - - // https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj32268.html - $encDatabase = $this->addIdentifierQuotes( strtoupper( $database ) ); - $sql = "ALTER SESSION SET CURRENT_SCHEMA=$encDatabase"; - $stmt = oci_parse( $this->conn, $sql ); - Wikimedia\suppressWarnings(); - $success = oci_execute( $stmt ); - Wikimedia\restoreWarnings(); - if ( $success ) { - // Update that domain fields on success (no exception thrown) - $this->currentDomain = $domain; - } else { - $e = oci_error( $stmt ); - $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ ); - } - - return true; - } - - function strencode( $s ) { - return str_replace( "'", "''", $s ); - } - - function addQuotes( $s ) { - return "'" . $this->strencode( $this->getVerifiedUTF8( $s ) ) . "'"; - } - - public function addIdentifierQuotes( $s ) { - if ( !$this->getFlag( DBO_DDLMODE ) ) { - $s = '/*Q*/' . $s; - } - - return $s; - } - - public function removeIdentifierQuotes( $s ) { - return strpos( $s, '/*Q*/' ) === false ? $s : substr( $s, 5 ); - } - - public function isQuotedIdentifier( $s ) { - return strpos( $s, '/*Q*/' ) !== false; - } - - private function wrapFieldForWhere( $table, &$col, &$val ) { - $col_info = $this->fieldInfoMulti( $table, $col ); - $col_type = $col_info != false ? $col_info->type() : 'CONSTANT'; - if ( $col_type == 'CLOB' ) { - $col = 'TO_CHAR(' . $col . ')'; - $val = $this->getVerifiedUTF8( $val ); - } elseif ( $col_type == 'VARCHAR2' ) { - $val = $this->getVerifiedUTF8( $val ); - } - } - - private function wrapConditionsForWhere( $table, $conds, $parentCol = null ) { - $conds2 = []; - foreach ( $conds as $col => $val ) { - if ( is_array( $val ) ) { - $conds2[$col] = $this->wrapConditionsForWhere( $table, $val, $col ); - } else { - if ( is_numeric( $col ) && $parentCol != null ) { - $this->wrapFieldForWhere( $table, $parentCol, $val ); - } else { - $this->wrapFieldForWhere( $table, $col, $val ); - } - $conds2[$col] = $val; - } - } - - return $conds2; - } - - function selectRow( $table, $vars, $conds, $fname = __METHOD__, - $options = [], $join_conds = [] - ) { - if ( is_array( $conds ) ) { - $conds = $this->wrapConditionsForWhere( $table, $conds ); - } - - return parent::selectRow( $table, $vars, $conds, $fname, $options, $join_conds ); - } - - /** - * Returns an optional USE INDEX clause to go after the table, and a - * string to go at the end of the query - * - * @param array $options An associative array of options to be turned into - * an SQL query, valid keys are listed in the function. - * @return array - */ - function makeSelectOptions( $options ) { - $preLimitTail = $postLimitTail = ''; - $startOpts = ''; - - $noKeyOptions = []; - foreach ( $options as $key => $option ) { - if ( is_numeric( $key ) ) { - $noKeyOptions[$option] = true; - } - } - - $preLimitTail .= $this->makeGroupByWithHaving( $options ); - - $preLimitTail .= $this->makeOrderBy( $options ); - - if ( isset( $noKeyOptions['FOR UPDATE'] ) ) { - $postLimitTail .= ' FOR UPDATE'; - } - - if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) { - $startOpts .= 'DISTINCT'; - } - - if ( isset( $options['USE INDEX'] ) && !is_array( $options['USE INDEX'] ) ) { - $useIndex = $this->useIndexClause( $options['USE INDEX'] ); - } else { - $useIndex = ''; - } - - if ( isset( $options['IGNORE INDEX'] ) && !is_array( $options['IGNORE INDEX'] ) ) { - $ignoreIndex = $this->ignoreIndexClause( $options['IGNORE INDEX'] ); - } else { - $ignoreIndex = ''; - } - - return [ $startOpts, $useIndex, $preLimitTail, $postLimitTail, $ignoreIndex ]; - } - - public function delete( $table, $conds, $fname = __METHOD__ ) { - global $wgActorTableSchemaMigrationStage; - - if ( is_array( $conds ) ) { - $conds = $this->wrapConditionsForWhere( $table, $conds ); - } - // a hack for deleting pages, users and images (which have non-nullable FKs) - // all deletions on these tables have transactions so final failure rollbacks these updates - // @todo: Normalize the schema to match MySQL, no special FKs and such - $table = $this->tableName( $table ); - if ( $table == $this->tableName( 'user' ) && - ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_WRITE_OLD ) - ) { - $this->update( 'archive', [ 'ar_user' => 0 ], - [ 'ar_user' => $conds['user_id'] ], $fname ); - $this->update( 'ipblocks', [ 'ipb_user' => 0 ], - [ 'ipb_user' => $conds['user_id'] ], $fname ); - $this->update( 'image', [ 'img_user' => 0 ], - [ 'img_user' => $conds['user_id'] ], $fname ); - $this->update( 'oldimage', [ 'oi_user' => 0 ], - [ 'oi_user' => $conds['user_id'] ], $fname ); - $this->update( 'filearchive', [ 'fa_deleted_user' => 0 ], - [ 'fa_deleted_user' => $conds['user_id'] ], $fname ); - $this->update( 'filearchive', [ 'fa_user' => 0 ], - [ 'fa_user' => $conds['user_id'] ], $fname ); - $this->update( 'uploadstash', [ 'us_user' => 0 ], - [ 'us_user' => $conds['user_id'] ], $fname ); - $this->update( 'recentchanges', [ 'rc_user' => 0 ], - [ 'rc_user' => $conds['user_id'] ], $fname ); - $this->update( 'logging', [ 'log_user' => 0 ], - [ 'log_user' => $conds['user_id'] ], $fname ); - } elseif ( $table == $this->tableName( 'image' ) ) { - $this->update( 'oldimage', [ 'oi_name' => 0 ], - [ 'oi_name' => $conds['img_name'] ], $fname ); - } - - return parent::delete( $table, $conds, $fname ); - } - - /** - * @param string $table - * @param array $values - * @param array $conds - * @param string $fname - * @param array $options - * @return bool - * @throws DBUnexpectedError - */ - function update( $table, $values, $conds, $fname = __METHOD__, $options = [] ) { - $table = $this->tableName( $table ); - $opts = $this->makeUpdateOptions( $options ); - $sql = "UPDATE $opts $table SET "; - - $first = true; - foreach ( $values as $col => &$val ) { - $sqlSet = $this->fieldBindStatement( $table, $col, $val, true ); - - if ( !$first ) { - $sqlSet = ', ' . $sqlSet; - } else { - $first = false; - } - $sql .= $sqlSet; - } - - if ( $conds !== [] && $conds !== '*' ) { - $conds = $this->wrapConditionsForWhere( $table, $conds ); - $sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND ); - } - - $this->mLastResult = $stmt = oci_parse( $this->conn, $sql ); - if ( $stmt === false ) { - $e = oci_error( $this->conn ); - $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ ); - - return false; - } - foreach ( $values as $col => &$val ) { - $col_info = $this->fieldInfoMulti( $table, $col ); - $col_type = $col_info != false ? $col_info->type() : 'CONSTANT'; - - if ( $val === null ) { - // do nothing ... null was inserted in statement creation - } elseif ( $col_type != 'BLOB' && $col_type != 'CLOB' ) { - if ( is_object( $val ) ) { - $val = $val->getData(); - } - - if ( - preg_match( '/^timestamp.*/i', $col_type ) == 1 && - strtolower( $val ) == 'infinity' - ) { - $val = '31-12-2030 12:00:00.000000'; - } - - $val = $this->getVerifiedUTF8( $val ); - if ( oci_bind_by_name( $stmt, ":$col", $val ) === false ) { - $e = oci_error( $stmt ); - $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ ); - - return false; - } - } else { - /** @var OCI_Lob[] $lob */ - $lob[$col] = oci_new_descriptor( $this->conn, OCI_D_LOB ); - if ( $lob[$col] === false ) { - $e = oci_error( $stmt ); - throw new DBUnexpectedError( - $this, - "Cannot create LOB descriptor: " . $e['message'] - ); - } - - if ( is_object( $val ) ) { - $val = $val->getData(); - } - - if ( $col_type == 'BLOB' ) { - $lob[$col]->writeTemporary( $val ); - oci_bind_by_name( $stmt, ":$col", $lob[$col], -1, SQLT_BLOB ); - } else { - $lob[$col]->writeTemporary( $val ); - oci_bind_by_name( $stmt, ":$col", $lob[$col], -1, OCI_B_CLOB ); - } - } - } - - Wikimedia\suppressWarnings(); - - if ( oci_execute( $stmt, $this->execFlags() ) === false ) { - $e = oci_error( $stmt ); - if ( !$this->ignoreDupValOnIndex || $e['code'] != '1' ) { - $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ ); - - return false; - } else { - $this->mAffectedRows = oci_num_rows( $stmt ); - } - } else { - $this->mAffectedRows = oci_num_rows( $stmt ); - } - - Wikimedia\restoreWarnings(); - - if ( isset( $lob ) ) { - foreach ( $lob as $lob_v ) { - $lob_v->free(); - } - } - - if ( !$this->trxLevel() ) { - oci_commit( $this->conn ); - } - - return oci_free_statement( $stmt ); - } - - function bitNot( $field ) { - // expecting bit-fields smaller than 4bytes - return 'BITNOT(' . $field . ')'; - } - - function bitAnd( $fieldLeft, $fieldRight ) { - return 'BITAND(' . $fieldLeft . ', ' . $fieldRight . ')'; - } - - function bitOr( $fieldLeft, $fieldRight ) { - return 'BITOR(' . $fieldLeft . ', ' . $fieldRight . ')'; - } - - public function buildGroupConcatField( - $delim, $table, $field, $conds = '', $join_conds = [] - ) { - $fld = "LISTAGG($field," . $this->addQuotes( $delim ) . ") WITHIN GROUP (ORDER BY $field)"; - - return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')'; - } - - public function buildSubstring( $input, $startPosition, $length = null ) { - $this->assertBuildSubstringParams( $startPosition, $length ); - $params = [ $input, $startPosition ]; - if ( $length !== null ) { - $params[] = $length; - } - return 'SUBSTR(' . implode( ',', $params ) . ')'; - } - - /** - * @param string $field Field or column to cast - * @return string - * @since 1.28 - */ - public function buildStringCast( $field ) { - return 'CAST ( ' . $field . ' AS VARCHAR2 )'; - } - - public function getInfinity() { - return '31-12-2030 12:00:00.000000'; - } - - /** - * @param string $s - * @return string - */ - private function getVerifiedUTF8( $s ) { - if ( mb_check_encoding( (string)$s, 'UTF-8' ) ) { - return $s; // valid - } - - throw new DBUnexpectedError( $this, "Non BLOB/CLOB field must be UTF-8." ); - } -} diff --git a/includes/deferred/DeferrableCallback.php b/includes/deferred/DeferrableCallback.php index 2eb0d5dfa0..33961ed7bf 100644 --- a/includes/deferred/DeferrableCallback.php +++ b/includes/deferred/DeferrableCallback.php @@ -9,5 +9,5 @@ interface DeferrableCallback { /** * @return string Originating method name */ - function getOrigin(); + public function getOrigin(); } diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index d43ffbc975..3380364b6d 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -362,11 +362,16 @@ class DeferredUpdates { $update->setTransactionTicket( $ticket ); } - $fnameTrxOwner = get_class( $update ) . '::doUpdate'; + // Designate $update::doUpdate() as the write round owner + $fnameTrxOwner = ( $update instanceof DeferrableCallback ) + ? $update->getOrigin() + : get_class( $update ) . '::doUpdate'; + // Determine whether the write round will be explicit or implicit $useExplicitTrxRound = !( $update instanceof TransactionRoundAwareUpdate && $update->getTransactionRoundRequirement() == $update::TRX_ROUND_ABSENT ); + // Flush any pending changes left over from an implicit transaction round if ( $useExplicitTrxRound ) { $lbFactory->beginMasterChanges( $fnameTrxOwner ); // new explicit round diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 841daea195..1d3b402076 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -401,7 +401,8 @@ class DifferenceEngine extends ContextSource { * @return string|bool Link HTML or false */ public function deletedLink( $id ) { - if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( $permissionManager->userHasRight( $this->getUser(), 'deletedhistory' ) ) { $dbr = wfGetDB( DB_REPLICA ); $arQuery = Revision::getArchiveQueryInfo(); $row = $dbr->selectRow( @@ -803,7 +804,8 @@ class DifferenceEngine extends ContextSource { // Build the link if ( $rcid ) { $this->getOutput()->preventClickjacking(); - if ( $user->isAllowed( 'writeapi' ) ) { + if ( MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $user, 'writeapi' ) ) { $this->getOutput()->addModules( 'mediawiki.page.patrol.ajax' ); } diff --git a/includes/editpage/TextboxBuilder.php b/includes/editpage/TextboxBuilder.php index 103b3e5498..8161251d0b 100644 --- a/includes/editpage/TextboxBuilder.php +++ b/includes/editpage/TextboxBuilder.php @@ -75,8 +75,8 @@ class TextboxBuilder { public function getTextboxProtectionCSSClasses( Title $title ) { $classes = []; // Textarea CSS if ( $title->isProtected( 'edit' ) && - MediaWikiServices::getInstance()->getNamespaceInfo()-> - getRestrictionLevels( $title->getNamespace() ) !== [ '' ] + MediaWikiServices::getInstance()->getPermissionManager() + ->getNamespaceRestrictionLevels( $title->getNamespace() ) !== [ '' ] ) { # Is the title semi-protected? if ( $title->isSemiProtected() ) { diff --git a/includes/exception/PermissionsError.php b/includes/exception/PermissionsError.php index cc69a762c1..87a3dc2819 100644 --- a/includes/exception/PermissionsError.php +++ b/includes/exception/PermissionsError.php @@ -18,6 +18,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * Show an error when a user tries to do something they do not have the necessary * permissions for. @@ -46,7 +48,9 @@ class PermissionsError extends ErrorPageError { if ( !count( $errors ) ) { $groups = []; - foreach ( User::getGroupsWithPermission( $this->permission ) as $group ) { + foreach ( MediaWikiServices::getInstance() + ->getPermissionManager() + ->getGroupsWithPermission( $this->permission ) as $group ) { $groups[] = UserGroupMembership::getLink( $group, RequestContext::getMain(), 'wiki' ); } diff --git a/includes/filebackend/FileBackendGroup.php b/includes/filebackend/FileBackendGroup.php index 7ec2357e5b..db7141f76b 100644 --- a/includes/filebackend/FileBackendGroup.php +++ b/includes/filebackend/FileBackendGroup.php @@ -186,7 +186,7 @@ class FileBackendGroup { 'mimeCallback' => [ $this, 'guessMimeInternal' ], 'obResetFunc' => 'wfResetOutputBuffers', 'streamMimeFunc' => [ StreamFile::class, 'contentTypeFromPath' ], - 'tmpDirectory' => wfTempDir(), + 'tmpFileFactory' => MediaWikiServices::getInstance()->getTempFSFileFactory(), 'statusWrapper' => [ Status::class, 'wrap' ], 'wanCache' => $services->getMainWANObjectCache(), 'srvCache' => ObjectCache::getLocalServerInstance( 'hash' ), @@ -241,7 +241,8 @@ class FileBackendGroup { if ( !$type && $fsPath ) { $type = $magic->guessMimeType( $fsPath, false ); } elseif ( !$type && strlen( $content ) ) { - $tmpFile = TempFSFile::factory( 'mime_', '', wfTempDir() ); + $tmpFile = MediaWikiServices::getInstance()->getTempFSFileFactory() + ->newTempFSFile( 'mime_', '' ); file_put_contents( $tmpFile->getPath(), $content ); $type = $magic->guessMimeType( $tmpFile->getPath(), false ); } diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index ee7ee6f90d..5f6a0cbcd7 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1352,7 +1352,8 @@ abstract class File implements IDBAccessObject { */ protected function makeTransformTmpFile( $thumbPath ) { $thumbExt = FileBackend::extensionFromPath( $thumbPath ); - return TempFSFile::factory( 'transform_', $thumbExt, wfTempDir() ); + return MediaWikiServices::getInstance()->getTempFSFileFactory() + ->newTempFSFile( 'transform_', $thumbExt ); } /** diff --git a/includes/gallery/TraditionalImageGallery.php b/includes/gallery/TraditionalImageGallery.php index d25d9aa861..fadd5878ba 100644 --- a/includes/gallery/TraditionalImageGallery.php +++ b/includes/gallery/TraditionalImageGallery.php @@ -111,8 +111,8 @@ class TraditionalImageGallery extends ImageGalleryBase { if ( $this->mParser instanceof Parser ) { $this->mParser->addTrackingCategory( 'broken-file-category' ); } - } elseif ( $this->mHideBadImages - && wfIsBadImage( $nt->getDBkey(), $this->getContextTitle() ) + } elseif ( $this->mHideBadImages && MediaWikiServices::getInstance()->getBadFileLookup() + ->isBadFile( $nt->getDBkey(), $this->getContextTitle() ) ) { # The image is blacklisted, just show it as a text link. $thumbhtml = "\n\t\t\t" . '
text(); } diff --git a/includes/installer/MssqlInstaller.php b/includes/installer/MssqlInstaller.php deleted file mode 100644 index 8b5ff116a8..0000000000 --- a/includes/installer/MssqlInstaller.php +++ /dev/null @@ -1,738 +0,0 @@ - 'sa', - '_InstallWindowsAuthentication' => 'sqlauth', - '_WebWindowsAuthentication' => 'sqlauth', - ]; - - // SQL Server 2005 RTM - // @todo Are SQL Express version numbers different?) - public static $minimumVersion = '9.00.1399'; - protected static $notMinimumVersionMessage = 'config-mssql-old'; - - // These are schema-level privs - // Note: the web user will be created will full permissions if possible, this permission - // list is only used if we are unable to grant full permissions. - public $webUserPrivs = [ - 'DELETE', - 'INSERT', - 'SELECT', - 'UPDATE', - 'EXECUTE', - ]; - - /** - * @return string - */ - public function getName() { - return 'mssql'; - } - - /** - * @return bool - */ - public function isCompiled() { - return self::checkExtension( 'sqlsrv' ); - } - - /** - * @return string - */ - public function getConnectForm() { - if ( $this->getVar( '_InstallWindowsAuthentication' ) == 'windowsauth' ) { - $displayStyle = 'display: none;'; - } else { - $displayStyle = 'display: block;'; - } - - return $this->getTextBox( - 'wgDBserver', - 'config-db-host', - [], - $this->parent->getHelpBox( 'config-db-host-help' ) - ) . - Html::openElement( 'fieldset' ) . - Html::element( 'legend', [], wfMessage( 'config-db-wiki-settings' )->text() ) . - $this->getTextBox( 'wgDBname', 'config-db-name', [ 'dir' => 'ltr' ], - $this->parent->getHelpBox( 'config-db-name-help' ) ) . - $this->getTextBox( 'wgDBmwschema', 'config-db-schema', [ 'dir' => 'ltr' ], - $this->parent->getHelpBox( 'config-db-schema-help' ) ) . - $this->getTextBox( 'wgDBprefix', 'config-db-prefix', [ 'dir' => 'ltr' ], - $this->parent->getHelpBox( 'config-db-prefix-help' ) ) . - Html::closeElement( 'fieldset' ) . - Html::openElement( 'fieldset' ) . - Html::element( 'legend', [], wfMessage( 'config-db-install-account' )->text() ) . - $this->getRadioSet( [ - 'var' => '_InstallWindowsAuthentication', - 'label' => 'config-mssql-auth', - 'itemLabelPrefix' => 'config-mssql-', - 'values' => [ 'sqlauth', 'windowsauth' ], - 'itemAttribs' => [ - 'sqlauth' => [ - 'class' => 'showHideRadio', - 'rel' => 'dbCredentialBox', - ], - 'windowsauth' => [ - 'class' => 'hideShowRadio', - 'rel' => 'dbCredentialBox', - ] - ], - 'help' => $this->parent->getHelpBox( 'config-mssql-install-auth' ) - ] ) . - Html::openElement( 'div', [ 'id' => 'dbCredentialBox', 'style' => $displayStyle ] ) . - $this->getTextBox( - '_InstallUser', - 'config-db-username', - [ 'dir' => 'ltr' ], - $this->parent->getHelpBox( 'config-db-install-username' ) - ) . - $this->getPasswordBox( - '_InstallPassword', - 'config-db-password', - [ 'dir' => 'ltr' ], - $this->parent->getHelpBox( 'config-db-install-password' ) - ) . - Html::closeElement( 'div' ) . - Html::closeElement( 'fieldset' ); - } - - public function submitConnectForm() { - // Get variables from the request. - $newValues = $this->setVarsFromRequest( [ - 'wgDBserver', - 'wgDBname', - 'wgDBmwschema', - 'wgDBprefix' - ] ); - - // Validate them. - $status = Status::newGood(); - if ( !strlen( $newValues['wgDBserver'] ) ) { - $status->fatal( 'config-missing-db-host' ); - } - if ( !strlen( $newValues['wgDBname'] ) ) { - $status->fatal( 'config-missing-db-name' ); - } elseif ( !preg_match( '/^[a-z0-9_]+$/i', $newValues['wgDBname'] ) ) { - $status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] ); - } - if ( !preg_match( '/^[a-z0-9_]*$/i', $newValues['wgDBmwschema'] ) ) { - $status->fatal( 'config-invalid-schema', $newValues['wgDBmwschema'] ); - } - if ( !preg_match( '/^[a-z0-9_]*$/i', $newValues['wgDBprefix'] ) ) { - $status->fatal( 'config-invalid-db-prefix', $newValues['wgDBprefix'] ); - } - if ( !$status->isOK() ) { - return $status; - } - - // Check for blank schema and remap to dbo - if ( $newValues['wgDBmwschema'] === '' ) { - $this->setVar( 'wgDBmwschema', 'dbo' ); - } - - // User box - $this->setVarsFromRequest( [ - '_InstallUser', - '_InstallPassword', - '_InstallWindowsAuthentication' - ] ); - - // Try to connect - $status = $this->getConnection(); - if ( !$status->isOK() ) { - return $status; - } - /** - * @var Database $conn - */ - $conn = $status->value; - - // Check version - return static::meetsMinimumRequirement( $conn->getServerVersion() ); - } - - /** - * @return Status - */ - public function openConnection() { - global $wgDBWindowsAuthentication; - $status = Status::newGood(); - $user = $this->getVar( '_InstallUser' ); - $password = $this->getVar( '_InstallPassword' ); - - if ( $this->getVar( '_InstallWindowsAuthentication' ) == 'windowsauth' ) { - // Use Windows authentication for this connection - $wgDBWindowsAuthentication = true; - } else { - $wgDBWindowsAuthentication = false; - } - - try { - /** @var DatabaseMssql $db */ - $db = Database::factory( 'mssql', [ - 'host' => $this->getVar( 'wgDBserver' ), - 'port' => $this->getVar( 'wgDBport' ), - 'user' => $user, - 'password' => $password, - 'dbname' => false, - 'flags' => 0, - 'schema' => $this->getVar( 'wgDBmwschema' ), - 'tablePrefix' => $this->getVar( 'wgDBprefix' ) ] ); - $db->prepareStatements( false ); - $db->scrollableCursor( false ); - $status->value = $db; - } catch ( DBConnectionError $e ) { - $status->fatal( 'config-connection-error', $e->getMessage() ); - } - - return $status; - } - - public function preUpgrade() { - global $wgDBuser, $wgDBpassword; - - $status = $this->getConnection(); - if ( !$status->isOK() ) { - $this->parent->showStatusMessage( $status ); - - return; - } - /** - * @var Database $conn - */ - $conn = $status->value; - $conn->selectDB( $this->getVar( 'wgDBname' ) ); - - # Normal user and password are selected after this step, so for now - # just copy these two - $wgDBuser = $this->getVar( '_InstallUser' ); - $wgDBpassword = $this->getVar( '_InstallPassword' ); - } - - /** - * Return true if the install user can create accounts - * - * @return bool - */ - public function canCreateAccounts() { - $status = $this->getConnection(); - if ( !$status->isOK() ) { - return false; - } - /** @var Database $conn */ - $conn = $status->value; - - // We need the server-level ALTER ANY LOGIN permission to create new accounts - $res = $conn->query( "SELECT permission_name FROM sys.fn_my_permissions( NULL, 'SERVER' )" ); - $serverPrivs = [ - 'ALTER ANY LOGIN' => false, - 'CONTROL SERVER' => false, - ]; - - foreach ( $res as $row ) { - $serverPrivs[$row->permission_name] = true; - } - - if ( !$serverPrivs['ALTER ANY LOGIN'] ) { - return false; - } - - // Check to ensure we can grant everything needed as well - // We can't actually tell if we have WITH GRANT OPTION for a given permission, so we assume we do - // and just check for the permission - // https://technet.microsoft.com/en-us/library/ms178569.aspx - // The following array sets up which permissions imply whatever permissions we specify - $implied = [ - // schema database server - 'DELETE' => [ 'DELETE', 'CONTROL SERVER' ], - 'EXECUTE' => [ 'EXECUTE', 'CONTROL SERVER' ], - 'INSERT' => [ 'INSERT', 'CONTROL SERVER' ], - 'SELECT' => [ 'SELECT', 'CONTROL SERVER' ], - 'UPDATE' => [ 'UPDATE', 'CONTROL SERVER' ], - ]; - - $grantOptions = array_flip( $this->webUserPrivs ); - - // Check for schema and db-level permissions, but only if the schema/db exists - $schemaPrivs = $dbPrivs = [ - 'DELETE' => false, - 'EXECUTE' => false, - 'INSERT' => false, - 'SELECT' => false, - 'UPDATE' => false, - ]; - - $dbPrivs['ALTER ANY USER'] = false; - - if ( $this->databaseExists( $this->getVar( 'wgDBname' ) ) ) { - $conn->selectDB( $this->getVar( 'wgDBname' ) ); - $res = $conn->query( "SELECT permission_name FROM sys.fn_my_permissions( NULL, 'DATABASE' )" ); - - foreach ( $res as $row ) { - $dbPrivs[$row->permission_name] = true; - } - - // If the db exists, we need ALTER ANY USER privs on it to make a new user - if ( !$dbPrivs['ALTER ANY USER'] ) { - return false; - } - - if ( $this->schemaExists( $this->getVar( 'wgDBmwschema' ) ) ) { - // wgDBmwschema is validated to only contain alphanumeric + underscore, so this is safe - $res = $conn->query( "SELECT permission_name FROM sys.fn_my_permissions( " - . "'{$this->getVar( 'wgDBmwschema' )}', 'SCHEMA' )" ); - - foreach ( $res as $row ) { - $schemaPrivs[$row->permission_name] = true; - } - } - } - - // Now check all the grants we'll need to be doing to see if we can - foreach ( $this->webUserPrivs as $permission ) { - if ( ( isset( $schemaPrivs[$permission] ) && $schemaPrivs[$permission] ) - || ( isset( $dbPrivs[$implied[$permission][0]] ) - && $dbPrivs[$implied[$permission][0]] ) - || ( isset( $serverPrivs[$implied[$permission][1]] ) - && $serverPrivs[$implied[$permission][1]] ) - ) { - unset( $grantOptions[$permission] ); - } - } - - if ( count( $grantOptions ) ) { - // Can't grant everything - return false; - } - - return true; - } - - /** - * @return string - */ - public function getSettingsForm() { - if ( $this->canCreateAccounts() ) { - $noCreateMsg = false; - } else { - $noCreateMsg = 'config-db-web-no-create-privs'; - } - - $wrapperStyle = $this->getVar( '_SameAccount' ) ? 'display: none' : ''; - $displayStyle = $this->getVar( '_WebWindowsAuthentication' ) == 'windowsauth' - ? 'display: none' - : ''; - $s = Html::openElement( 'fieldset' ) . - Html::element( 'legend', [], wfMessage( 'config-db-web-account' )->text() ) . - $this->getCheckBox( - '_SameAccount', 'config-db-web-account-same', - [ 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' ] - ) . - Html::openElement( 'div', [ 'id' => 'dbOtherAccount', 'style' => $wrapperStyle ] ) . - $this->getRadioSet( [ - 'var' => '_WebWindowsAuthentication', - 'label' => 'config-mssql-auth', - 'itemLabelPrefix' => 'config-mssql-', - 'values' => [ 'sqlauth', 'windowsauth' ], - 'itemAttribs' => [ - 'sqlauth' => [ - 'class' => 'showHideRadio', - 'rel' => 'dbCredentialBox', - ], - 'windowsauth' => [ - 'class' => 'hideShowRadio', - 'rel' => 'dbCredentialBox', - ] - ], - 'help' => $this->parent->getHelpBox( 'config-mssql-web-auth' ) - ] ) . - Html::openElement( 'div', [ 'id' => 'dbCredentialBox', 'style' => $displayStyle ] ) . - $this->getTextBox( 'wgDBuser', 'config-db-username' ) . - $this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) . - Html::closeElement( 'div' ); - - if ( $noCreateMsg ) { - $s .= $this->parent->getWarningBox( wfMessage( $noCreateMsg )->plain() ); - } else { - $s .= $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create' ); - } - - $s .= Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' ); - - return $s; - } - - /** - * @return Status - */ - public function submitSettingsForm() { - $this->setVarsFromRequest( [ - 'wgDBuser', - 'wgDBpassword', - '_SameAccount', - '_CreateDBAccount', - '_WebWindowsAuthentication' - ] ); - - if ( $this->getVar( '_SameAccount' ) ) { - $this->setVar( '_WebWindowsAuthentication', $this->getVar( '_InstallWindowsAuthentication' ) ); - $this->setVar( 'wgDBuser', $this->getVar( '_InstallUser' ) ); - $this->setVar( 'wgDBpassword', $this->getVar( '_InstallPassword' ) ); - } - - if ( $this->getVar( '_WebWindowsAuthentication' ) == 'windowsauth' ) { - $this->setVar( 'wgDBuser', '' ); - $this->setVar( 'wgDBpassword', '' ); - $this->setVar( 'wgDBWindowsAuthentication', true ); - } else { - $this->setVar( 'wgDBWindowsAuthentication', false ); - } - - if ( $this->getVar( '_CreateDBAccount' ) - && $this->getVar( '_WebWindowsAuthentication' ) == 'sqlauth' - && strval( $this->getVar( 'wgDBpassword' ) ) == '' - ) { - return Status::newFatal( 'config-db-password-empty', $this->getVar( 'wgDBuser' ) ); - } - - // Validate the create checkbox - $canCreate = $this->canCreateAccounts(); - if ( !$canCreate ) { - $this->setVar( '_CreateDBAccount', false ); - $create = false; - } else { - $create = $this->getVar( '_CreateDBAccount' ); - } - - if ( !$create ) { - // Test the web account - $user = $this->getVar( 'wgDBuser' ); - $password = $this->getVar( 'wgDBpassword' ); - - if ( $this->getVar( '_WebWindowsAuthentication' ) == 'windowsauth' ) { - $user = 'windowsauth'; - $password = 'windowsauth'; - } - - try { - Database::factory( 'mssql', [ - 'host' => $this->getVar( 'wgDBserver' ), - 'user' => $user, - 'password' => $password, - 'dbname' => false, - 'flags' => 0, - 'tablePrefix' => $this->getVar( 'wgDBprefix' ), - 'schema' => $this->getVar( 'wgDBmwschema' ), - ] ); - } catch ( DBConnectionError $e ) { - return Status::newFatal( 'config-connection-error', $e->getMessage() ); - } - } - - return Status::newGood(); - } - - public function preInstall() { - # Add our user callback to installSteps, right before the tables are created. - $callback = [ - 'name' => 'user', - 'callback' => [ $this, 'setupUser' ], - ]; - $this->parent->addInstallStep( $callback, 'tables' ); - } - - /** - * @return Status - */ - public function setupDatabase() { - $status = $this->getConnection(); - if ( !$status->isOK() ) { - return $status; - } - /** @var Database $conn */ - $conn = $status->value; - $dbName = $this->getVar( 'wgDBname' ); - $schemaName = $this->getVar( 'wgDBmwschema' ); - if ( !$this->databaseExists( $dbName ) ) { - $conn->query( - "CREATE DATABASE " . $conn->addIdentifierQuotes( $dbName ), - __METHOD__ - ); - } - $conn->selectDB( $dbName ); - if ( !$this->schemaExists( $schemaName ) ) { - $conn->query( - "CREATE SCHEMA " . $conn->addIdentifierQuotes( $schemaName ), - __METHOD__ - ); - } - if ( !$this->catalogExists( $schemaName ) ) { - $conn->query( - "CREATE FULLTEXT CATALOG " . $conn->addIdentifierQuotes( $schemaName ), - __METHOD__ - ); - } - $this->setupSchemaVars(); - - return $status; - } - - /** - * @return Status - */ - public function setupUser() { - $dbUser = $this->getVar( 'wgDBuser' ); - if ( $dbUser == $this->getVar( '_InstallUser' ) - || ( $this->getVar( '_InstallWindowsAuthentication' ) == 'windowsauth' - && $this->getVar( '_WebWindowsAuthentication' ) == 'windowsauth' ) ) { - return Status::newGood(); - } - $status = $this->getConnection(); - if ( !$status->isOK() ) { - return $status; - } - - $this->setupSchemaVars(); - $dbName = $this->getVar( 'wgDBname' ); - $this->db->selectDB( $dbName ); - $password = $this->getVar( 'wgDBpassword' ); - $schemaName = $this->getVar( 'wgDBmwschema' ); - - if ( $this->getVar( '_WebWindowsAuthentication' ) == 'windowsauth' ) { - $dbUser = 'windowsauth'; - $password = 'windowsauth'; - } - - if ( $this->getVar( '_CreateDBAccount' ) ) { - $tryToCreate = true; - } else { - $tryToCreate = false; - } - - $escUser = $this->db->addIdentifierQuotes( $dbUser ); - $escDb = $this->db->addIdentifierQuotes( $dbName ); - $escSchema = $this->db->addIdentifierQuotes( $schemaName ); - $grantableNames = []; - if ( $tryToCreate ) { - $escPass = $this->db->addQuotes( $password ); - - if ( !$this->loginExists( $dbUser ) ) { - try { - $this->db->begin(); - $this->db->selectDB( 'master' ); - $logintype = $this->getVar( '_WebWindowsAuthentication' ) == 'windowsauth' - ? 'FROM WINDOWS' - : "WITH PASSWORD = $escPass"; - $this->db->query( "CREATE LOGIN $escUser $logintype" ); - $this->db->selectDB( $dbName ); - $this->db->query( "CREATE USER $escUser FOR LOGIN $escUser WITH DEFAULT_SCHEMA = $escSchema" ); - $this->db->commit(); - $grantableNames[] = $dbUser; - } catch ( DBQueryError $dqe ) { - $this->db->rollback(); - $status->warning( 'config-install-user-create-failed', $dbUser, $dqe->getMessage() ); - } - } elseif ( !$this->userExists( $dbUser ) ) { - try { - $this->db->begin(); - $this->db->selectDB( $dbName ); - $this->db->query( "CREATE USER $escUser FOR LOGIN $escUser WITH DEFAULT_SCHEMA = $escSchema" ); - $this->db->commit(); - $grantableNames[] = $dbUser; - } catch ( DBQueryError $dqe ) { - $this->db->rollback(); - $status->warning( 'config-install-user-create-failed', $dbUser, $dqe->getMessage() ); - } - } else { - $status->warning( 'config-install-user-alreadyexists', $dbUser ); - $grantableNames[] = $dbUser; - } - } - - // Try to grant to all the users we know exist or we were able to create - $this->db->selectDB( $dbName ); - if ( $grantableNames ) { - try { - // First try to grant full permissions - $fullPrivArr = [ - 'BACKUP DATABASE', 'BACKUP LOG', 'CREATE FUNCTION', 'CREATE PROCEDURE', - 'CREATE TABLE', 'CREATE VIEW', 'CREATE FULLTEXT CATALOG', 'SHOWPLAN' - ]; - $fullPrivList = implode( ', ', $fullPrivArr ); - $this->db->begin(); - $this->db->query( "GRANT $fullPrivList ON DATABASE :: $escDb TO $escUser", __METHOD__ ); - $this->db->query( "GRANT CONTROL ON SCHEMA :: $escSchema TO $escUser", __METHOD__ ); - $this->db->commit(); - } catch ( DBQueryError $dqe ) { - // If that fails, try to grant the limited subset specified in $this->webUserPrivs - try { - $privList = implode( ', ', $this->webUserPrivs ); - $this->db->rollback(); - $this->db->begin(); - $this->db->query( "GRANT $privList ON SCHEMA :: $escSchema TO $escUser", __METHOD__ ); - $this->db->commit(); - } catch ( DBQueryError $dqe ) { - $this->db->rollback(); - $status->fatal( 'config-install-user-grant-failed', $dbUser, $dqe->getMessage() ); - } - // Also try to grant SHOWPLAN on the db, but don't fail if we can't - // (just makes a couple things in mediawiki run slower since - // we have to run SELECT COUNT(*) instead of getting the query plan) - try { - $this->db->query( "GRANT SHOWPLAN ON DATABASE :: $escDb TO $escUser", __METHOD__ ); - } catch ( DBQueryError $dqe ) { - } - } - } - - return $status; - } - - public function createTables() { - $status = parent::createTables(); - - // Do last-minute stuff like fulltext indexes (since they can't be inside a transaction) - if ( $status->isOK() ) { - $searchindex = $this->db->tableName( 'searchindex' ); - $schema = $this->db->addIdentifierQuotes( $this->getVar( 'wgDBmwschema' ) ); - try { - $this->db->query( "CREATE FULLTEXT INDEX ON $searchindex (si_title, si_text) " - . "KEY INDEX si_page ON $schema" ); - } catch ( DBQueryError $dqe ) { - $status->fatal( 'config-install-tables-failed', $dqe->getMessage() ); - } - } - - return $status; - } - - public function getGlobalDefaults() { - // The default $wgDBmwschema is null, which breaks Postgres and other DBMSes that require - // the use of a schema, so we need to set it here - return array_merge( parent::getGlobalDefaults(), [ - 'wgDBmwschema' => 'mediawiki', - ] ); - } - - /** - * Try to see if the login exists - * @param string $user Username to check - * @return bool - */ - private function loginExists( $user ) { - $res = $this->db->selectField( 'sys.sql_logins', 1, [ 'name' => $user ] ); - return (bool)$res; - } - - /** - * Try to see if the user account exists - * We assume we already have the appropriate database selected - * @param string $user Username to check - * @return bool - */ - private function userExists( $user ) { - $res = $this->db->selectField( 'sys.sysusers', 1, [ 'name' => $user ] ); - return (bool)$res; - } - - /** - * Try to see if a given database exists - * @param string $dbName Database name to check - * @return bool - */ - private function databaseExists( $dbName ) { - $res = $this->db->selectField( 'sys.databases', 1, [ 'name' => $dbName ] ); - return (bool)$res; - } - - /** - * Try to see if a given schema exists - * We assume we already have the appropriate database selected - * @param string $schemaName Schema name to check - * @return bool - */ - private function schemaExists( $schemaName ) { - $res = $this->db->selectField( 'sys.schemas', 1, [ 'name' => $schemaName ] ); - return (bool)$res; - } - - /** - * Try to see if a given fulltext catalog exists - * We assume we already have the appropriate database selected - * @param string $catalogName Catalog name to check - * @return bool - */ - private function catalogExists( $catalogName ) { - $res = $this->db->selectField( 'sys.fulltext_catalogs', 1, [ 'name' => $catalogName ] ); - return (bool)$res; - } - - /** - * Get variables to substitute into tables.sql and the SQL patch files. - * - * @return array - */ - public function getSchemaVars() { - return [ - 'wgDBname' => $this->getVar( 'wgDBname' ), - 'wgDBmwschema' => $this->getVar( 'wgDBmwschema' ), - 'wgDBuser' => $this->getVar( 'wgDBuser' ), - 'wgDBpassword' => $this->getVar( 'wgDBpassword' ), - ]; - } - - public function getLocalSettings() { - $schema = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgDBmwschema' ) ); - $prefix = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgDBprefix' ) ); - $windowsauth = $this->getVar( 'wgDBWindowsAuthentication' ) ? 'true' : 'false'; - - return "# MSSQL specific settings -\$wgDBWindowsAuthentication = {$windowsauth}; -\$wgDBmwschema = \"{$schema}\"; -\$wgDBprefix = \"{$prefix}\";"; - } -} diff --git a/includes/installer/MssqlUpdater.php b/includes/installer/MssqlUpdater.php deleted file mode 100644 index b8dc5ff451..0000000000 --- a/includes/installer/MssqlUpdater.php +++ /dev/null @@ -1,199 +0,0 @@ -1.25->1.27 do not execute these scripts twice even though the - // updatekeys no longer make sense as they are. - [ 'updateSchema', 'categorylinks', 'cl_type-category_types-ck', - 'patch-categorylinks-constraints.sql' ], - [ 'updateSchema', 'filearchive', 'fa_major_mime-major_mime-ck', - 'patch-filearchive-constraints.sql' ], - [ 'updateSchema', 'oldimage', 'oi_major_mime-major_mime-ck', - 'patch-oldimage-constraints.sql' ], - [ 'updateSchema', 'image', 'img_major_mime-major_mime-ck', 'patch-image-constraints.sql' ], - [ 'updateSchema', 'uploadstash', 'us_media_type-media_type-ck', - 'patch-uploadstash-constraints.sql' ], - - [ 'modifyField', 'image', 'img_major_mime', - 'patch-img_major_mime-chemical.sql' ], - [ 'modifyField', 'oldimage', 'oi_major_mime', - 'patch-oi_major_mime-chemical.sql' ], - [ 'modifyField', 'filearchive', 'fa_major_mime', - 'patch-fa_major_mime-chemical.sql' ], - - // 1.27 - [ 'dropTable', 'msg_resource_links' ], - [ 'dropTable', 'msg_resource' ], - [ 'addField', 'watchlist', 'wl_id', 'patch-watchlist-wl_id.sql' ], - [ 'dropField', 'mwuser', 'user_options', 'patch-drop-user_options.sql' ], - [ 'addTable', 'bot_passwords', 'patch-bot_passwords.sql' ], - [ 'addField', 'pagelinks', 'pl_from_namespace', 'patch-pl_from_namespace.sql' ], - [ 'addField', 'templatelinks', 'tl_from_namespace', 'patch-tl_from_namespace.sql' ], - [ 'addField', 'imagelinks', 'il_from_namespace', 'patch-il_from_namespace.sql' ], - [ 'dropIndex', 'categorylinks', 'cl_collation', 'patch-kill-cl_collation_index.sql' ], - [ 'addIndex', 'categorylinks', 'cl_collation_ext', - 'patch-add-cl_collation_ext_index.sql' ], - [ 'dropField', 'recentchanges', 'rc_cur_time', 'patch-drop-rc_cur_time.sql' ], - [ 'addField', 'page_props', 'pp_sortkey', 'patch-pp_sortkey.sql' ], - [ 'updateSchema', 'oldimage', 'oldimage varchar', 'patch-oldimage-schema.sql' ], - [ 'updateSchema', 'filearchive', 'filearchive varchar', 'patch-filearchive-schema.sql' ], - [ 'updateSchema', 'image', 'image varchar', 'patch-image-schema.sql' ], - [ 'updateSchema', 'recentchanges', 'recentchanges-drop-fks', - 'patch-recentchanges-drop-fks.sql' ], - [ 'updateSchema', 'logging', 'logging-drop-fks', 'patch-logging-drop-fks.sql' ], - [ 'updateSchema', 'archive', 'archive-drop-fks', 'patch-archive-drop-fks.sql' ], - - // 1.28 - [ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp', - 'patch-add-rc_name_type_patrolled_timestamp_index.sql' ], - [ 'addField', 'change_tag', 'ct_id', 'patch-change_tag-ct_id.sql' ], - - // 1.29 - [ 'addField', 'externallinks', 'el_index_60', 'patch-externallinks-el_index_60.sql' ], - [ 'dropIndex', 'oldimage', 'oi_name_archive_name', - 'patch-alter-table-oldimage.sql' ], - - // 1.30 - [ 'modifyField', 'image', 'img_media_type', 'patch-add-3d.sql' ], - [ 'addIndex', 'site_stats', 'PRIMARY', 'patch-site_stats-pk.sql' ], - - // Should have been in 1.30 - [ 'addTable', 'comment', 'patch-comment-table.sql' ], - // This field was added in 1.31, but is put here so it can be used by 'migrateComments' - [ 'addField', 'image', 'img_description_id', 'patch-image-img_description_id.sql' ], - // Should have been in 1.30 - [ 'migrateComments' ], - - // 1.31 - [ 'addTable', 'slot_roles', 'patch-slot_roles.sql' ], - [ 'addTable', 'content_models', 'patch-content_models.sql' ], - [ 'addTable', 'content', 'patch-content.sql' ], - [ 'addTable', 'slots', 'patch-slots.sql' ], - [ 'addField', 'slots', 'slot_origin', 'patch-slot-origin.sql' ], - [ 'migrateArchiveText' ], - [ 'addTable', 'actor', 'patch-actor-table.sql' ], - [ 'migrateActors' ], - [ 'modifyField', 'revision', 'rev_text_id', 'patch-rev_text_id-default.sql' ], - [ 'modifyTable', 'site_stats', 'patch-site_stats-modify.sql' ], - [ 'populateArchiveRevId' ], - [ 'modifyField', 'recentchanges', 'rc_patrolled', 'patch-rc_patrolled_type.sql' ], - [ 'addIndex', 'recentchanges', 'rc_namespace_title_timestamp', - 'patch-recentchanges-nttindex.sql' ], - - // 1.32 - [ 'addTable', 'change_tag_def', 'patch-change_tag_def.sql' ], - [ 'populateExternallinksIndex60' ], - [ 'modifyfield', 'externallinks', 'el_index_60', - 'patch-externallinks-el_index_60-drop-default.sql' ], - [ 'runMaintenance', DeduplicateArchiveRevId::class, 'maintenance/deduplicateArchiveRevId.php' ], - [ 'addField', 'change_tag', 'ct_tag_id', 'patch-change_tag-tag_id.sql' ], - [ 'addIndex', 'archive', 'ar_revid_uniq', 'patch-archive-ar_rev_id-unique.sql' ], - [ 'populateContentTables' ], - [ 'addIndex', 'logging', 'log_type_action', 'patch-logging-log-type-action-index.sql' ], - [ 'dropIndex', 'logging', 'type_action', 'patch-logging-drop-type-action-index.sql' ], - [ 'addIndex', 'interwiki', 'PRIMARY', 'patch-interwiki-pk.sql' ], - [ 'addIndex', 'protected_titles', 'PRIMARY', 'patch-protected_titles-pk.sql' ], - [ 'addIndex', 'page_props', 'PRIMARY', 'patch-page_props-pk.sql' ], - [ 'addIndex', 'site_identifiers', 'PRIMARY', 'patch-site_identifiers-pk.sql' ], - [ 'addIndex', 'recentchanges', 'rc_this_oldid', 'patch-recentchanges-rc_this_oldid-index.sql' ], - [ 'dropTable', 'transcache' ], - [ 'runMaintenance', PopulateChangeTagDef::class, 'maintenance/populateChangeTagDef.php' ], - [ 'addIndex', 'change_tag', 'change_tag_rc_tag_id', - 'patch-change_tag-change_tag_rc_tag_id.sql' ], - [ 'addField', 'ipblocks', 'ipb_sitewide', 'patch-ipb_sitewide.sql' ], - [ 'addTable', 'ipblocks_restrictions', 'patch-ipblocks_restrictions-table.sql' ], - [ 'migrateImageCommentTemp' ], - - // 1.33 - [ 'dropField', 'change_tag', 'ct_tag', 'patch-drop-ct_tag.sql' ], - [ 'dropTable', 'valid_tag' ], - [ 'dropTable', 'tag_summary' ], - [ 'dropField', 'protected_titles', 'pt_reason', 'patch-drop-comment-fields.sql' ], - ]; - } - - protected function applyPatch( $path, $isFullPath = false, $msg = null ) { - $prevScroll = $this->db->scrollableCursor( false ); - $prevPrep = $this->db->prepareStatements( false ); - parent::applyPatch( $path, $isFullPath, $msg ); - $this->db->scrollableCursor( $prevScroll ); - $this->db->prepareStatements( $prevPrep ); - return true; - } - - /** - * General schema update for a table that touches more than one field or requires - * destructive actions (such as dropping and recreating the table). NOTE: Usage of - * this function is highly discouraged, use it's successor DatabaseUpdater::modifyTable - * instead. - * - * @param string $table - * @param string $updatekey - * @param string $patch - * @param bool $fullpath - * @return bool - */ - protected function updateSchema( $table, $updatekey, $patch, $fullpath = false ) { - if ( !$this->db->tableExists( $table, __METHOD__ ) ) { - $this->output( "...$table table does not exist, skipping schema update patch.\n" ); - } elseif ( $this->updateRowExists( $updatekey ) ) { - $this->output( "...$table already had schema updated by $patch.\n" ); - } else { - $apply = $this->applyPatch( $patch, $fullpath, "Updating schema of table $table" ); - if ( $apply ) { - $this->insertUpdateRow( $updatekey ); - } - return $apply; - } - - return true; - } -} diff --git a/includes/installer/OracleInstaller.php b/includes/installer/OracleInstaller.php deleted file mode 100644 index 1a4e0f71de..0000000000 --- a/includes/installer/OracleInstaller.php +++ /dev/null @@ -1,340 +0,0 @@ - 'USERS', - '_OracleTempTS' => 'TEMP', - '_InstallUser' => 'SYSTEM', - ]; - - public static $minimumVersion = '9.0.1'; // 9iR1 - protected static $notMinimumVersionMessage = 'config-oracle-old'; - - protected $connError = null; - - public function getName() { - return 'oracle'; - } - - public function isCompiled() { - return self::checkExtension( 'oci8' ); - } - - public function getConnectForm() { - if ( $this->getVar( 'wgDBserver' ) == 'localhost' ) { - $this->parent->setVar( 'wgDBserver', '' ); - } - - return $this->getTextBox( - 'wgDBserver', - 'config-db-host-oracle', - [], - $this->parent->getHelpBox( 'config-db-host-oracle-help' ) - ) . - Html::openElement( 'fieldset' ) . - Html::element( 'legend', [], wfMessage( 'config-db-wiki-settings' )->text() ) . - $this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) . - $this->getTextBox( '_OracleDefTS', 'config-oracle-def-ts' ) . - $this->getTextBox( - '_OracleTempTS', - 'config-oracle-temp-ts', - [], - $this->parent->getHelpBox( 'config-db-oracle-help' ) - ) . - Html::closeElement( 'fieldset' ) . - $this->parent->getWarningBox( wfMessage( 'config-db-account-oracle-warn' )->text() ) . - $this->getInstallUserBox() . - $this->getWebUserBox(); - } - - public function submitInstallUserBox() { - parent::submitInstallUserBox(); - $this->parent->setVar( '_InstallDBname', $this->getVar( '_InstallUser' ) ); - - return Status::newGood(); - } - - public function submitConnectForm() { - // Get variables from the request - $newValues = $this->setVarsFromRequest( [ - 'wgDBserver', - 'wgDBprefix', - 'wgDBuser', - 'wgDBpassword' - ] ); - $this->parent->setVar( 'wgDBname', $this->getVar( 'wgDBuser' ) ); - - // Validate them - $status = Status::newGood(); - if ( !strlen( $newValues['wgDBserver'] ) ) { - $status->fatal( 'config-missing-db-server-oracle' ); - } elseif ( !self::checkConnectStringFormat( $newValues['wgDBserver'] ) ) { - $status->fatal( 'config-invalid-db-server-oracle', $newValues['wgDBserver'] ); - } - if ( !preg_match( '/^[a-zA-Z0-9_]*$/', $newValues['wgDBprefix'] ) ) { - $status->fatal( 'config-invalid-schema', $newValues['wgDBprefix'] ); - } - if ( !$status->isOK() ) { - return $status; - } - - // Submit user box - $status = $this->submitInstallUserBox(); - if ( !$status->isOK() ) { - return $status; - } - - // Try to connect trough multiple scenarios - // Scenario 1: Install with a manually created account - $status = $this->getConnection(); - if ( !$status->isOK() ) { - if ( $this->connError == 28009 ) { - // _InstallUser seems to be a SYSDBA - // Scenario 2: Create user with SYSDBA and install with new user - $status = $this->submitWebUserBox(); - if ( !$status->isOK() ) { - return $status; - } - $status = $this->openSYSDBAConnection(); - if ( !$status->isOK() ) { - return $status; - } - if ( !$this->getVar( '_CreateDBAccount' ) ) { - $status->fatal( 'config-db-sys-create-oracle' ); - } - } else { - return $status; - } - } else { - // check for web user credentials - // Scenario 3: Install with a priviliged user but use a restricted user - $statusIS3 = $this->submitWebUserBox(); - if ( !$statusIS3->isOK() ) { - return $statusIS3; - } - } - - /** - * @var Database $conn - */ - $conn = $status->value; - - // Check version - $status->merge( static::meetsMinimumRequirement( $conn->getServerVersion() ) ); - - return $status; - } - - public function openConnection() { - return $this->doOpenConnection(); - } - - public function openSYSDBAConnection() { - return $this->doOpenConnection( DatabaseOracle::DBO_SYSDBA ); - } - - /** - * @param int $flags - * @return Status Status with DatabaseOracle or null as the value - */ - private function doOpenConnection( $flags = 0 ) { - $status = Status::newGood(); - try { - $db = Database::factory( - 'oracle', - [ - 'host' => $this->getVar( 'wgDBserver' ), - 'user' => $this->getVar( '_InstallUser' ), - 'password' => $this->getVar( '_InstallPassword' ), - 'dbname' => $this->getVar( '_InstallDBname' ), - 'tablePrefix' => $this->getVar( 'wgDBprefix' ), - 'flags' => $flags - ] - ); - $status->value = $db; - } catch ( DBConnectionError $e ) { - $this->connError = $e->db->lastErrno(); - $status->fatal( 'config-connection-error', $e->getMessage() ); - } - - return $status; - } - - public function needsUpgrade() { - $tempDBname = $this->getVar( 'wgDBname' ); - $this->parent->setVar( 'wgDBname', $this->getVar( 'wgDBuser' ) ); - $retVal = parent::needsUpgrade(); - $this->parent->setVar( 'wgDBname', $tempDBname ); - - return $retVal; - } - - public function preInstall() { - # Add our user callback to installSteps, right before the tables are created. - $callback = [ - 'name' => 'user', - 'callback' => [ $this, 'setupUser' ] - ]; - $this->parent->addInstallStep( $callback, 'database' ); - } - - public function setupDatabase() { - $status = Status::newGood(); - - return $status; - } - - public function setupUser() { - global $IP; - - if ( !$this->getVar( '_CreateDBAccount' ) ) { - return Status::newGood(); - } - - // normaly only SYSDBA users can create accounts - $status = $this->openSYSDBAConnection(); - if ( !$status->isOK() ) { - if ( $this->connError == 1031 ) { - // insufficient privileges (looks like a normal user) - $status = $this->openConnection(); - if ( !$status->isOK() ) { - return $status; - } - } else { - return $status; - } - } - - $this->db = $status->value; - $this->setupSchemaVars(); - - if ( !$this->db->selectDB( $this->getVar( 'wgDBuser' ) ) ) { - $this->db->setFlag( DBO_DDLMODE ); - $error = $this->db->sourceFile( "$IP/maintenance/oracle/user.sql" ); - if ( $error !== true || !$this->db->selectDB( $this->getVar( 'wgDBuser' ) ) ) { - $status->fatal( 'config-install-user-failed', $this->getVar( 'wgDBuser' ), $error ); - } - } elseif ( $this->db->getFlag( DBO_SYSDBA ) ) { - $status->fatal( 'config-db-sys-user-exists-oracle', $this->getVar( 'wgDBuser' ) ); - } - - if ( $status->isOK() ) { - // user created or already existing, switching back to a normal connection - // as the new user has all needed privileges to setup the rest of the schema - // i will be using that user as _InstallUser from this point on - $this->db->close(); - $this->db = false; - $this->parent->setVar( '_InstallUser', $this->getVar( 'wgDBuser' ) ); - $this->parent->setVar( '_InstallPassword', $this->getVar( 'wgDBpassword' ) ); - $this->parent->setVar( '_InstallDBname', $this->getVar( 'wgDBuser' ) ); - $status = $this->getConnection(); - } - - return $status; - } - - /** - * Overload: after this action field info table has to be rebuilt - * @return Status - */ - public function createTables() { - $this->setupSchemaVars(); - $this->db->setFlag( DBO_DDLMODE ); - $this->parent->setVar( 'wgDBname', $this->getVar( 'wgDBuser' ) ); - $status = parent::createTables(); - $this->db->clearFlag( DBO_DDLMODE ); - - $this->db->query( 'BEGIN fill_wiki_info; END;' ); - - return $status; - } - - public function getSchemaVars() { - $varNames = [ - # These variables are used by maintenance/oracle/user.sql - '_OracleDefTS', - '_OracleTempTS', - 'wgDBuser', - 'wgDBpassword', - - # These are used by tables.sql - 'wgDBprefix', - ]; - $vars = []; - foreach ( $varNames as $name ) { - $vars[$name] = $this->getVar( $name ); - } - - return $vars; - } - - public function getLocalSettings() { - $prefix = $this->getVar( 'wgDBprefix' ); - - return "# Oracle specific settings -\$wgDBprefix = \"{$prefix}\"; -"; - } - - /** - * Function checks the format of Oracle connect string - * The actual validity of the string is checked by attempting to connect - * - * Regex should be able to validate all connect string formats - * [//](host|tns_name)[:port][/service_name][:POOLED] - * http://www.orafaq.com/wiki/EZCONNECT - * - * @since 1.22 - * - * @param string $connect_string - * - * @return bool Whether the connection string is valid. - */ - public static function checkConnectStringFormat( $connect_string ) { - // phpcs:disable Generic.Files.LineLength - // @todo Very long regular expression. Make more readable? - $isValid = preg_match( '/^[[:alpha:]][\w\-]*(?:\.[[:alpha:]][\w\-]*){0,2}$/', $connect_string ); // TNS name - $isValid |= preg_match( '/^(?:\/\/)?[\w\-\.]+(?::[\d]+)?(?:\/(?:[\w\-\.]+(?::(pooled|dedicated|shared))?)?(?:\/[\w\-\.]+)?)?$/', $connect_string ); // EZConnect - // phpcs:enable - return (bool)$isValid; - } -} diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php deleted file mode 100644 index d3a7b132a7..0000000000 --- a/includes/installer/OracleUpdater.php +++ /dev/null @@ -1,374 +0,0 @@ -db->fieldInfo( 'page', 'page_namespace' ); - if ( $meta->defaultValue() != null ) { - return; - } - - $this->applyPatch( - 'patch_namespace_defaults.sql', - false, - 'Altering namespace fields with default value' - ); - } - - /** - * Uniform FK names + deferrable state - */ - protected function doFKRenameDeferr() { - $meta = $this->db->query( ' - SELECT COUNT(*) cnt - FROM user_constraints - WHERE constraint_type = \'R\' AND deferrable = \'DEFERRABLE\'' - ); - $row = $meta->fetchRow(); - if ( $row && $row['cnt'] > 0 ) { - return; - } - - $this->applyPatch( 'patch_fk_rename_deferred.sql', false, "Altering foreign keys ... " ); - } - - /** - * Recreate functions to 17 schema layout - */ - protected function doFunctions17() { - $this->applyPatch( 'patch_create_17_functions.sql', false, "Recreating functions" ); - } - - /** - * Schema upgrade 16->17 - * there are no incremental patches prior to this - */ - protected function doSchemaUpgrade17() { - // check if iwlinks table exists which was added in 1.17 - if ( $this->db->tableExists( 'iwlinks' ) ) { - return; - } - $this->applyPatch( 'patch_16_17_schema_changes.sql', false, "Updating schema to 17" ); - } - - /** - * Insert page (page_id = 0) to prevent FK constraint violation - */ - protected function doInsertPage0() { - $this->output( "Inserting page 0 if missing ... " ); - $row = [ - 'page_id' => 0, - 'page_namespace' => 0, - 'page_title' => ' ', - 'page_is_redirect' => 0, - 'page_is_new' => 0, - 'page_random' => 0, - 'page_touched' => $this->db->timestamp(), - 'page_latest' => 0, - 'page_len' => 0 - ]; - $this->db->insert( 'page', $row, 'OracleUpdater:doInserPage0', [ 'IGNORE' ] ); - $this->output( "ok\n" ); - } - - /** - * Remove DEFAULT '' NOT NULL constraints from fields as '' is internally - * converted to NULL in Oracle - */ - protected function doRemoveNotNullEmptyDefaults() { - $meta = $this->db->fieldInfo( 'categorylinks', 'cl_sortkey_prefix' ); - if ( $meta->isNullable() ) { - return; - } - $this->applyPatch( - 'patch_remove_not_null_empty_defs.sql', - false, - 'Removing not null empty constraints' - ); - } - - protected function doRemoveNotNullEmptyDefaults2() { - $meta = $this->db->fieldInfo( 'ipblocks', 'ipb_by_text' ); - if ( $meta->isNullable() ) { - return; - } - $this->applyPatch( - 'patch_remove_not_null_empty_defs2.sql', - false, - 'Removing not null empty constraints' - ); - } - - /** - * Removed forcing of invalid state on recentchanges_fk2. - * cascading taken in account in the deleting function - */ - protected function doRecentchangesFK2Cascade() { - $meta = $this->db->query( 'SELECT 1 FROM all_constraints WHERE owner = \'' . - strtoupper( $this->db->getDBname() ) . - '\' AND constraint_name = \'' . - $this->db->tablePrefix() . - 'RECENTCHANGES_FK2\' AND delete_rule = \'CASCADE\'' - ); - $row = $meta->fetchRow(); - if ( $row ) { - return; - } - - $this->applyPatch( 'patch_recentchanges_fk2_cascade.sql', false, "Altering RECENTCHANGES_FK2" ); - } - - /** - * Fixed wrong PK, UK definition - */ - protected function doPageRestrictionsPKUKFix() { - $this->output( "Altering PAGE_RESTRICTIONS keys ... " ); - - $meta = $this->db->query( 'SELECT column_name FROM all_cons_columns WHERE owner = \'' . - strtoupper( $this->db->getDBname() ) . - '\' AND constraint_name = \'' . - $this->db->tablePrefix() . - 'PAGE_RESTRICTIONS_PK\' AND rownum = 1' - ); - $row = $meta->fetchRow(); - if ( $row['column_name'] == 'PR_ID' ) { - $this->output( "seems to be up to date.\n" ); - - return; - } - - $this->applyPatch( 'patch-page_restrictions_pkuk_fix.sql', false ); - $this->output( "ok\n" ); - } - - /** - * Add auto-increment triggers - */ - protected function doAutoIncrementTriggers() { - $this->output( "Adding auto-increment triggers ... " ); - - $meta = $this->db->query( 'SELECT trigger_name FROM user_triggers WHERE table_owner = \'' . - strtoupper( $this->db->getDBname() ) . - '\' AND trigger_name = \'' . - $this->db->tablePrefix() . - 'PAGE_DEFAULT_PAGE_ID\'' - ); - $row = $meta->fetchRow(); - if ( $row['column_name'] ) { - $this->output( "seems to be up to date.\n" ); - - return; - } - - $this->applyPatch( 'patch-auto_increment_triggers.sql', false ); - - $this->output( "ok\n" ); - } - - /** - * rebuilding of the function that duplicates tables for tests - */ - protected function doRebuildDuplicateFunction() { - $this->applyPatch( 'patch_rebuild_dupfunc.sql', false, "Rebuilding duplicate function" ); - } - - /** - * Overload: after this action field info table has to be rebuilt - * - * @param array $what - */ - public function doUpdates( array $what = [ 'core', 'extensions', 'purge', 'stats' ] ) { - parent::doUpdates( $what ); - - $this->db->query( 'BEGIN fill_wiki_info; END;' ); - } - - /** - * Overload: because of the DDL_MODE tablename escaping is a bit dodgy - */ - public function purgeCache() { - # We can't guarantee that the user will be able to use TRUNCATE, - # but we know that DELETE is available to us - $this->output( "Purging caches..." ); - $this->db->delete( '/*Q*/' . $this->db->tableName( 'objectcache' ), '*', __METHOD__ ); - $this->output( "done.\n" ); - } -} diff --git a/includes/installer/SqliteInstaller.php b/includes/installer/SqliteInstaller.php index cf91ccd9fc..7c39dedae4 100644 --- a/includes/installer/SqliteInstaller.php +++ b/includes/installer/SqliteInstaller.php @@ -356,7 +356,14 @@ EOT; global $IP; $module = DatabaseSqlite::getFulltextSearchModule(); - $fts3tTable = $this->db->checkForEnabledSearch(); + $searchIndexSql = (string)$this->db->selectField( + $this->db->addIdentifierQuotes( 'sqlite_master' ), + 'sql', + [ 'tbl_name' => $this->db->tableName( 'searchindex', 'raw' ) ], + __METHOD__ + ); + $fts3tTable = ( stristr( $searchIndexSql, 'fts' ) !== false ); + if ( $fts3tTable && !$module ) { $status->warning( 'config-sqlite-fts3-downgrade' ); $this->db->sourceFile( "$IP/maintenance/sqlite/archives/searchindex-no-fts.sql" ); diff --git a/includes/installer/WebInstallerDBConnect.php b/includes/installer/WebInstallerDBConnect.php index 7546bdf9d2..3bacb76e99 100644 --- a/includes/installer/WebInstallerDBConnect.php +++ b/includes/installer/WebInstallerDBConnect.php @@ -48,8 +48,7 @@ class WebInstallerDBConnect extends WebInstallerPage { $settings = ''; $defaultType = $this->getVar( 'wgDBtype' ); - // Messages: config-dbsupport-mysql, config-dbsupport-postgres, config-dbsupport-oracle, - // config-dbsupport-sqlite, config-dbsupport-mssql + // Messages: config-dbsupport-mysql, config-dbsupport-postgres, config-dbsupport-sqlite $dbSupport = ''; foreach ( Installer::getDBTypes() as $type ) { $dbSupport .= wfMessage( "config-dbsupport-$type" )->plain() . "\n"; @@ -78,8 +77,7 @@ class WebInstallerDBConnect extends WebInstallerPage { ) . "\n"; - // Messages: config-header-mysql, config-header-postgres, config-header-oracle, - // config-header-sqlite + // Messages: config-header-mysql, config-header-postgres, config-header-sqlite $settings .= Html::openElement( 'div', [ diff --git a/includes/installer/i18n/af.json b/includes/installer/i18n/af.json index 04aba37ad4..b3d25a9eee 100644 --- a/includes/installer/i18n/af.json +++ b/includes/installer/i18n/af.json @@ -46,10 +46,8 @@ "config-diff3-bad": "GNU diff3 nie gevind nie.", "config-db-type": "Databasistipe:", "config-db-host": "Databasisbediener:", - "config-db-host-oracle": "Databasis-TNS:", "config-db-wiki-settings": "Identifiseer hierdie wiki", "config-db-name": "Databasisnaam:", - "config-db-name-oracle": "Databasis-skema:", "config-db-install-account": "Gebruiker vir die installasie", "config-db-username": "Databasis gebruikersnaam:", "config-db-password": "Databasis wagwoord:", @@ -58,12 +56,9 @@ "config-db-port": "Databasispoort:", "config-db-schema": "Skema vir MediaWiki", "config-sqlite-dir": "Gids vir SQLite se data:", - "config-oracle-def-ts": "Standaard tabelruimte:", - "config-oracle-temp-ts": "Tydelike tabelruimte:", "config-header-mysql": "MySQL-instellings", "config-header-postgres": "PostgreSQL-instellings", "config-header-sqlite": "SQLite-instellings", - "config-header-oracle": "Oracle-instellings", "config-invalid-db-type": "Ongeldige databasistipe", "config-missing-db-name": "U moet 'n waarde vir \"Databasnaam\" verskaf", "config-sqlite-readonly": "Die lêer $1 kan nie geskryf word nie.", diff --git a/includes/installer/i18n/ar.json b/includes/installer/i18n/ar.json index 46b9c21fb4..834c1294c9 100644 --- a/includes/installer/i18n/ar.json +++ b/includes/installer/i18n/ar.json @@ -94,13 +94,9 @@ "config-db-type": "نوع قاعدة البيانات:", "config-db-host": "مضيف قاعدة البيانات:", "config-db-host-help": "إذا كان خادم قاعدة البيانات موجودا في خادم مختلف، فأدخل اسم المضيف أو عنوان الآيبي هنا. \n\nإذا كنت تستخدم استضافة ويب مشتركة، فيجب أن يمنحك موفر الاستضافة اسم المضيف الصحيح في وثائقه. \n\nإذا كنت تستخدم MySQL، فإن استخدام \"localhost\" قد لا يعمل لاسم الخادم، إذا لم يتم ذلك، فجرب \"127.0.0.1\" لعنوان الآيبي المحلي. \n\nإذا كنت تستخدم PostgreSQL، فاترك هذا الحقل فارغا للاتصال عبر مقبس Unix.", - "config-db-host-oracle": "قاعدة بيانات TNS:", - "config-db-host-oracle-help": "أدخل [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm اسم اتصال محلي] صالحا، يجب أن يكون ملف tnsnames.ora مرئيا لهذا التثبيت.
إذا كنت تستخدم مكتبات العملاء 10g أو أحدث، فيمكنك أيضا استخدام طريقة التسمية [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.اتصال htm السهل].", "config-db-wiki-settings": "حدِّد هذا الويكي", "config-db-name": "اسم قاعدة البيانات (لا شرط):", "config-db-name-help": "اختر الاسم الذي يعرف الويكي الخاص بك. لا يجب أن يحتوي على مسافات. إذا كنت تستخدم استضافة المواقع المشتركة، مزود الاستضافة إما سيعطيك اسم قاعدة بيانات محددة لاستخدامها أو سيتيح لك إنشاء قواعد بيانات عن طريق لوحة التحكم.", - "config-db-name-oracle": "سكيما قاعدة البيانات:", - "config-db-account-oracle-warn": "هناك ثلاثة سيناريوهات مدعومة لتثبيت Oracle كقاعدة بيانات خلفية: \n\nإذا كنت ترغب في إنشاء حساب قاعدة بيانات كجزء من عملية التثبيت، فيُرجَى تقديم حساب بدور SYSDBA كحساب قاعدة بيانات للتثبيت وتحديد بيانات الاعتماد المطلوبة لحساب الوصول إلى الإنترنت، وإلا يمكنك إما إنشاء حساب الوصول إلى الويب يدويا وتزويد الحساب فقط (إذا كان يتطلب صلاحيات لإنشاء كائنات المخطط) أو توفير حسابين مختلفين، أحدهما له امتيازات إنشاء وامتياز مقيد للدخول إلى الويب. \n\nيمكن العثور على البرنامج النصي لإنشاء حساب له امتيازات مطلوبة في دليل \"maintenance/oracle/\" لهذا التثبيت، ضع في اعتبارك أن استخدام حساب مقيد سيؤدي إلى تعطيل جميع إمكانات الصيانة باستخدام الحساب الافتراضي.", "config-db-install-account": "حساب المستخدم للتنصيب", "config-db-username": "اسم مستخدم قاعدة البيانات:", "config-db-password": "كلمة سر قاعدة البيانات:", @@ -119,37 +115,24 @@ "config-pg-test-error": "لا يمكن الاتصال بقاعدة البيانات $1: $2", "config-sqlite-dir": "دليل بيانات SQLite:", "config-sqlite-dir-help": "يخزن SQLite جميع البيانات في ملف واحد. \n\nيجب أن يكون الدليل الذي توفره قابلا للكتابة بواسطة خادم الويب أثناء التثبيت. \n\nيجب أن يكون غير متاحا عبر الويب؛ هذا هو سبب عدم وضعه في مكان ملفات PHP الخاصة بك. \n\nسيقوم المثبت بكتابة ملف .htaccess معه، ولكن إذا فشل ذلك، يمكن لشخص ما الوصول إلى قاعدة بياناتك الأولية، \nيتضمن ذلك بيانات المستخدم الأولية (عناوين البريد الإلكتروني وكلمات المرور المجزأة) بالإضافة إلى المراجعات المحذوفة والبيانات المحظورة الأخرى على الويكي. \n\nفكر في وضع قاعدة البيانات في مكان آخر تماما، على سبيل المثال في /var/lib/mediawiki/yourwiki$1; لأن الدليل الأصلي $2 غير قابل للكتابة بواسطة خادم الويب، \nحدد المثبت المستخدم الذي يعمل عليه خادم الويب الخاص بك،\nاجعل الدليل $3 قابلا للكتابة بواسطته للمتابعة، \nفي نظام يونكس/لينوكس قم بـ: \n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "لا يمكن إنشاء دليل البيانات $1; لأن الدليل الأصلي $2 غير قابل للكتابة بواسطة خادم الويب، \nتعذر على المثبت تحديد المستخدم الذي يعمل عليه خادم الويب الخاص بك،\nاجعل الدليل $3 قابلا للكتابة بواسطته للمتابعة، \nفي نظام يونكس/لينوكس قم بـ: \n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -174,11 +157,6 @@ "config-mysql-engine": "محرك التخزين", "config-mysql-innodb": "InnoDB (مستحسن)", "config-mysql-engine-help": "InnoDB هو دائما الخيار الأفضل; لأنه يحتوي على دعم تزامن جيد.\n\nقد يكون MyISAM أسرع في تثبيت المستخدم الفردي أو للقراءة فقط،\nتميل قواعد بيانات MyISAM للتلف أكثر من قواعد بيانات InnoDB.", - "config-mssql-auth": "نوع الاستيثاق:", - "config-mssql-install-auth": "حدد نوع المصادقة الذي سيتم استخدامه للاتصال بقاعدة البيانات أثناء عملية التثبيت. \nإذا حددت \"{{int:config-mssql-windowsauth}}\"، فسيتم استخدام بيانات اعتماد أي مستخدم يعمل عليه خادم الويب.", - "config-mssql-web-auth": "حدد نوع المصادقة الذي سيستخدمه خادم الويب للاتصال بخادم قاعدة البيانات، أثناء التشغيل العادي للويكي. \nإذا حددت \"{{int:config-mssql-windowsauth}}\"، فسيتم استخدام بيانات اعتماد أي مستخدم يعمل عليه خادم الويب.", - "config-mssql-sqlauth": "مصادقة خادم SQL", - "config-mssql-windowsauth": "مصادقة ويندوز", "config-site-name": "اسم الويكي:", "config-site-name-help": "سيظهر هذا في شريط عنوان المتصفح وفي أماكن أخرى مختلفة.", "config-site-name-blank": "أدخل اسم موقع.", diff --git a/includes/installer/i18n/ast.json b/includes/installer/i18n/ast.json index 26d2ea7cce..55a1606230 100644 --- a/includes/installer/i18n/ast.json +++ b/includes/installer/i18n/ast.json @@ -87,13 +87,9 @@ "config-db-type": "Tipu de base de datos:", "config-db-host": "Servidor de la base de datos:", "config-db-host-help": "Si'l sirvidor de bases de datos ta nun sirvidor diferente, introduz equí la IP o'l nome del agospiu.\n\nSi tas usando un agospiu web compartíu, el so fornidor debió especificar el nome del agospiu na so documentación.\n\nSi tas usando MySQL, usar «localhost» pue nun funcionar pal nome del sirvidor. Si non, prueba «120.0.0.1» pa la direición IP llocal.\n\nSi tas usando PostgreSQL, dexa esti campu baleru pa coneutate per una ralura d'Unix.", - "config-db-host-oracle": "TNS de la base de datos:", - "config-db-host-oracle-help": "Escribe un [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm nome de conexón local] válidu; un archivu tnsnames.ora ten de ser visible pa esta instalación.
Si tas utilizando biblioteques de veceru 10g o más recién tamién puedes utilizar el métodu de asignación de nomes [http://download.oracle.com/docs/cd/Y11882_01/network.112/y10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifica esta wiki", "config-db-name": "Nome de la base de datos (ensin guiones):", "config-db-name-help": "Escueye un nome qu'identifique la to wiki. Nun tien de contener espacios. \nSi tas utilizando agospiamientu web compartíu, el to provisor va date un nome específicu de base de datos por que lu utilices, o bien va dexate crear bases de datos al traviés d'un panel de control.", - "config-db-name-oracle": "Esquema de la base de datos:", - "config-db-account-oracle-warn": "Hai tres escenarios compatibles pa la instalación de Oracle como motor de base de datos:\n\nSi desees crear una cuenta de base de datos como parte del procesu d'instalación, por favor apurre una cuenta con rol SYSDBA como cuenta de base de datos pa la instalación y especifica les credenciales que quies tener pal accesu a la web a la cuenta; d'otra miente, puedes crear manualmente la cuenta d'accesu a la web y suministrar namái esa cuenta (si tien los permisos necesarios pa crear los oxetos d'esquema) o dar dos cuentes distintos, una con privilexos de creación y otra con accesu acutáu a la web\n\nLa secuencia de comandos (script) pa crear una cuenta colos privilexos necesarios puede atopase nel direutoriu \"maintenance/oracle/\" d'esta instalación. Ten en cuenta qu'utilizar una cuenta acutada va desactivar toles capacidaes de caltenimientu cola cuenta predeterminada.", "config-db-install-account": "Cuenta d'usuariu pa la instalación", "config-db-username": "Nome d'usuariu de base de datos:", "config-db-password": "Contraseña de base de datos:", @@ -112,37 +108,24 @@ "config-pg-test-error": "Nun puede coneutase cola base de datos $1: $2", "config-sqlite-dir": "Direutoriu de datos SQLite:", "config-sqlite-dir-help": "SQLite almacena tolos datos nun ficheru únicu.\n\nEl direutoriu que proporciones tien de poder escribise pol servidor web mientres la instalación.\n\nNun tendría de tener accesu pela web, por eso nun se pon nel sitiu onde tán los ficheros PHP.\n\nL'instalador escribirá un ficheru .htaccess xunto con él, pero si esto falla dalguién podría tener accesu a la base de datos completa.\nEso incluye los datos d'usuariu completos (direcciones de corréu electrónicu, contraseñes con hash) lo mesmo que les revisiones desaniciaes y otros datos acutaos de la wiki.\n\nConsidera poner la base de datos en dalgún otru sitiu, por casu en /var/lib/mediawiki/miowiki.", - "config-oracle-def-ts": "Espaciu de tables predetermináu:", - "config-oracle-temp-ts": "Espaciu de tables temporal:", "config-type-mysql": "MariaDB, MySQL o compatible", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki ye compatible colos siguientes sistemes de bases de datos:\n\n$1\n\nSi nun atopes na llista el sistema de base de datos que tas intentando utilizar, sigue les instrucciones enllazaes enriba p'activar la compatibilidá.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] ye la base de datos primaria pa MediaWiki y la que tien mayor encontu. MediaWiki tamién funciona con [{{int:version-db-myslql-url}} MySQL] y [{{int:version-db-percona-url}} Percona Server], que son compatibles con MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Cómo compilar PHP con compatibilidá MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] ye un sistema popular de base de datos de códigu abiertu, como alternativa a MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Cómo compilar PHP con compatibilidá PostgreSQL]).", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] ye un sistema de base de datos llixeru que tien encontu perbonu. ([https://https://www.php.net/manual/en/pdo.installation.php Cómo compilar PHP con encontu pa SQLite], usa PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] ye una base de datos comercial a nivel empresarial. ([https://www.php.net/manual/en/oci8.installation.php Cómo compilar PHP con encontu pa OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] ye un sistema comercial de base de datos empresariales pa Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Cómo compilar PHP con compatibilidá pa SQLSRV])", "config-header-mysql": "Axustes de MariaDB/MySQL", "config-header-postgres": "Axustes de PostgreSQL", "config-header-sqlite": "Axustes de SQLite", - "config-header-oracle": "Axustes d'Oracle", - "config-header-mssql": "Axustes de Microsoft SQL Server", "config-invalid-db-type": "Triba non válida de base de datos.", "config-missing-db-name": "Has introducir un valor pa «{{int:config-db-name}}».", "config-missing-db-host": "Has introducir un valor pa «{{int:config-db-host}}».", - "config-missing-db-server-oracle": "Has introducir un valor pa «{{int:config-db-host-oracle}}».", - "config-invalid-db-server-oracle": "TNS inválidu pa la base de datos «$1».\nUsa una cadena «TNS Name» o «Easy Connect» ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Métodos de nomenclatura d'Oracle]).", "config-invalid-db-name": "Nome inválidu de la base de datos «$1».\nUsa sólo lletres ASCII (a-z, A-Z), númberos (0-9), guiones baxos (_) y guiones (-).", "config-invalid-db-prefix": "Prefixu inválidu pa la base de datos «$1».\nUsa sólo lletres ASCII (a-z, A-Z), númberos (0-9), guiones baxos (_) y guiones (-).", "config-connection-error": "$1.\n\nComprueba'l sirvidor, el nome d'usuariu y la contraseña, y tenta nuevamente.Si uses \"localhost\" como sirvidor de base de datos, tenta usando \"127.0.0.1\" nel so llugar (o viceversa).", "config-invalid-schema": "Esquema inválidu «$1» pa MediaWiki.\nUsa sólo lletres ASCII (a-z, A-Z), númberos (0-9) y guiones baxos (_).", - "config-db-sys-create-oracle": "L'instalador namái sofita l'usu d'una cuenta SYSDBA pa la creación d'otra cuenta nueva.", - "config-db-sys-user-exists-oracle": "La cuenta d'usuariu «$1» yá esiste. ¡SYSDBA sólo puede utilizase pa crear una nueva cuenta!", "config-postgres-old": "Ríquese PostgreSQL $1 o posterior. Tienes la versión $2.", - "config-mssql-old": "Ríquese Microsoft SQL Server $1 o posterior. Tienes la versión $2.", "config-sqlite-name-help": "Escueye'l nome qu'identifica la to wiki.\nNun uses espacios o guiones.\nEsti va usase como nome del ficheru de datos pa SQLite.", "config-sqlite-parent-unwritable-group": "Nun puede crease el direutoriu de datos $1 porque'l servidor web nun tien permisu d'escritura nel direutoriu padre $2.\n\nL'instalador determinó l'usuariu col que s'executa'l sirvidor web.\nDa-y permisos d'escritura nel direutoriu $3 pa siguir.\nNun sistema Unix/Linux fai:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Nun puede crease'l direutoriu de datos $1, porque'l sirvidor web nun tien permisu d'escritura nel direutoriu padre $2.\n\nL'instalador nun pudo determinar l'usuariu col que s'executa'l sirvidor web.\nDa permisos d'escritura universal pa él (¡y pa otros!) nel direutoriu $3 pa siguir.\nNun sistema Unix/Linux fai:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -166,9 +149,6 @@ "config-db-web-no-create-privs": "La cuenta qu'especificasti pa la instalación nun tien permisos abondo pa crear una cuenta.\nLa cuenta qu'especifiques equí yá tien d'esistir.", "config-mysql-engine": "Motor d'almacenamientu:", "config-mysql-innodb": "InnoDB (aconséyase)", - "config-mssql-auth": "Triba d'autenticación:", - "config-mssql-sqlauth": "Autenticación de SQL Server", - "config-mssql-windowsauth": "Autenticación de Windows", "config-site-name": "Nome de la wiki:", "config-site-name-help": "Esto apaecerá na barra de títulos del navegador y en dellos sitios más.", "config-site-name-blank": "Escriba un nome pal sitiu.", diff --git a/includes/installer/i18n/ba.json b/includes/installer/i18n/ba.json index 23e53880b5..65bfc4f250 100644 --- a/includes/installer/i18n/ba.json +++ b/includes/installer/i18n/ba.json @@ -88,13 +88,9 @@ "config-db-type": "Мәғлүмәт базаһы төрө:", "config-db-host": "Мәғлүмәт базаһы хосты:", "config-db-host-help": "Әгәр ҙә серверҙың база мәғлүмәттәре икенсе серверҙа урынлашһа, бында уның исемен йәки IP-адресын индерегеҙ.\nӘгәр ҙә һеҙ виртуаль хостингты ҡулланһағыҙ, һеҙҙең провайдерығыҙ хостың дөрөҫ исемен үҙенең документацияһында күрһәтергә тейеш.\nӘгәр ҙә һеҙ системаны Windows аҫтына ҡуяһығыҙ һәм MySQL - ды ҡулланаһығыҙ икән, «localhost» исемле сервер эшләй алмаясаҡ. Был осраҡта 127.0.0.1 локаль IP-адресығыҙҙы күрһәтергә тырышығыҙ.\nӘгәр ҙә һеҙ PostgreSQL-ды ҡулланаһығыҙ икән, был шаҡмаҡты сокет Unix аша инеү өсөн буш ҡалдырығыҙ.", - "config-db-host-oracle": "TNS мәғлүмәт базаһы:", - "config-db-host-oracle-help": "Ғәмәлдәге [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name] индерегеҙ; tnsnames.ora файлы был инсталляция өсөн күренергә тейеш.
Клиенттарҙың 10g версияһындағы һәм юғарыраҡ китапханаһын ҡулланғанда шулай уҡ атама биреү ысулын файҙаланыу мөмкинлеге бар [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Был викиҙың идентификацияһы", "config-db-name": "Мәғлүмәт базаһы исеме:", "config-db-name-help": "Үҙегеҙҙең вики өсөн исем - идентификатор һайлағыҙ.\nИсемдә тултырылмаған урын булмаҫҡа тейеш.\nӘгәр һеҙ виртуаль хостингты ҡулланаһығыҙ икән, провайдер һеҙгә мәғлүмәттәр базаһының конкрет исемен бирер йәки идара итеү панеле ярҙамы менән мәғлүмәттәр базаһын булдырырға мөмкинлек бирер.", - "config-db-name-oracle": "Мәғлүмәт базаһы схемаһы", - "config-db-account-oracle-warn": "Oracle мәғлүмәттәр базаһы итеп ҡуйыуҙың өс юлы бар:\nӘгәр иҫәп яҙмаһын ҡуйыу процесында булдырырға теләһәгеҙ, зинһар, SYSDBA ҡуйыу өсөн иҫәп алыу ролен һәм веб-күҙәтеү мөмкинлеге булған иҫәп алыуҙың теләгән вәкәләттәрен күрһәтегеҙ. Шулай уҡ веб-күҙәтеү мөмкинлеге булған иҫәпте ҡулдан эшләргә һәм уны (әгәр схема объекттарын төҙөүгә кәрәкле рөхсәте бар икән) йәки ике иҫәп яҙмаһын, береһен - объекттар төҙөү хоҡуғы менән, икенсеһен веб-күҙәтеүҙе сикләүсе, күрһәтәһегеҙ. \nТейешле өҫтөнлөктәр менән иҫәп яҙмаһын булдырыу сценарийын ошо ҡоролма программаһының «maintenance/oracle/» папкаһында табырға мөмкин. Сикләнгән иҫәп яҙмаһын файҫаланыу килешеү буйынса иҫәп яҙмаларының барлыҡ мөмкинлектәрен һүндереүгә килтереү ихтималлығын күҙ уңында тотоғоҙ.", "config-db-install-account": "Көйләү өсөн иҫәп яҙмаһы", "config-db-username": "Мәғлүмәт базаһын ҡулланыусы исеме", "config-db-password": "Мәғлүмәт базаһының серһүҙе", @@ -113,34 +109,22 @@ "config-pg-test-error": "Мәғлүмәт базаһына инеп булманы$1: $2", "config-sqlite-dir": "SQLite мәғлүмәттәре директориһы:", "config-sqlite-dir-help": "SQLite бөтә мәғлүмәттәрҙе бер файлда һаҡлай. \nҠуйған ваҡытта веб-сервер һеҙ күрһәткән директорияны уҡый алырға тейеш. \n\nУға Интернет аша инеү '''мөмкин түгел''', шуға ул PHP файлдар һаҡланған файл менән тап килмәҫкә тейеш.\nҠуйыусы бал директорияны .htaccess файлына яҙасаҡ, әгәр ул эшләмәһә, кемдер бөтөн мәғлүмәт базаһына инә аласаҡ. Был базала шулай уҡ ҡулланыусылар тураһында мәғлүмәт тә (электрон почта адрестары, серһүҙ хештары), шулай уҡ юйылған биттәр һәм вики тураһында башҡа йәшерен мәғлүмәттәр һаҡлана. \n\nБыл базаны, мөмкин булһа, ситтәрәк, мәҫәлән, /var/lib/mediawiki/yourwiki һаҡлағыҙ.", - "config-oracle-def-ts": "Килешеү буйынса таблица арауығы:", - "config-oracle-temp-ts": "Таблицаларҙың ваҡытлы киңлеге:", "config-type-mysql": "MySQL (йәки тура килгән)", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki -ла түбәндәге СУБД бар:\n\n$1\n\nӘгәр мәғлүмәт һаҡлау системаһын исемлектә күрмәһәгеҙ, рөхсәт алыу өсөн өҫтәге һылтанмалағы инструкция буйынса эш итегеҙ.", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] — MediaWiki-ҙың иҫ яҡшы эшләгән төп мәғлүмәттәр базаһы. MediaWiki шулай уҡ MySQL-тап килгән [{{int:version-db-mariadb-url}} MariaDB] һәм [{{int:version-db-percona-url}} Percona Server] менән эшләй. ([https://www.php.net/manual/ru/mysql.installation.php MySQL-ярҙамында PHP туплау инструкцияһы])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] — СУБД-ның популяр открыткаһы, MySQL өсөн альтернатива.\nТөҙәтелмәгән хаталар булыуы мөмкин, эш схемаһында ҡулланыу тәҡдим ителмәй. ([https://www.php.net/manual/en/pgsql.installation.php PostgreSQL рөхсәт ителгән РНР йыйыу инструкцияһы]).", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] — яҡшы һәм еңел мәғлүмәт базаһы системаһы. ([http://www.php.net/manual/ru/pdo.installation.php собрать PHP SQLite] PDO менән эшләй торған инструкция)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] — предприятие масштабындаға коммерция базыһы. ([http://www.php.net/manual/ru/oci8.installation.php OCI8 ярҙамындағы РНР нисек йыйырға])", - "config-dbsupport-mssql": "* [{{int:version-db-oracle-url}} Oracle] — предприятие масштабындаға Windows өсөн коммерция базыһы. ([https://www.php.net/manual/en/sqlsrv.installation.php OCI8 ярҙамындағы РНР нисек йыйырға])", "config-header-mysql": "MySQL көйләү", "config-header-postgres": "PostgreSQL көйләү", "config-header-sqlite": "SQLite көйләү", - "config-header-oracle": "Оракул көйләү", - "config-header-mssql": "Microsoft SQL Серверенең билдәле дәүмәлдәре", "config-invalid-db-type": "Нигеҙ тибтарының дөрөҫ булмаған күрһәткестәре", "config-missing-db-name": "Һеҙ мәғәнәне индерергә тейешһегеҙ «{{int:config-db-name}}».", "config-missing-db-host": "Параметр мәғәнәһен индереү мотлаҡ «{{int:config-db-host}}».", - "config-missing-db-server-oracle": "Һеҙ бында мәғәнәне индерергә тейешһегеҙ «{{int:config-db-host-oracle}}».", - "config-invalid-db-server-oracle": "«$1» мәғлүмәттәр базаһының дөрөҫ булмаған TNS.\nЙә «TNS Name», йә «Easy Connect» ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle атамалары ысулы]) ҡулланығыҙ.", "config-invalid-db-name": "«$1» мәғлүмәттәр базаһының дөрөҫ булмаған префиксы. Тик ASCII символдарын: (a-z, A-Z) хәрефтәрен, (0-9) һандарын, (_) аҫтына һыҙыу билдәһен һәм (-)дефисты ҡулланығыҙ.", "config-invalid-db-prefix": "«$1» мәғлүмәттәр базаһының дөрөҫ булмаған префиксы. Тик ASCII (a-z, A-Z) хәрефтәрен, (0-9) һандарын, (_) аҫтына һыҙыу билдәһен һәм (-)дефисты ҡулланығыҙ.", "config-connection-error": "$1.\n\nХостығыҙҙы, ҡулланыусы исемен һәм паролде тикшерегеҙ ҙә яңынан инеп ҡарағыҙ.", "config-invalid-schema": "MediaWiki «$1» өсөн схема дөрөҫ түгел.\nБары тик ASCII символдарын (a-z, A-Z), цифрҙарҙы (0-9) һәм аҫҡы һыҙыҡты (_) ғына ҡулланығыҙ.", - "config-db-sys-create-oracle": "Яңы иҫәп-хисап яҙмаһын булдырыу өсөн урынлаштырыу программаһы тик SYSDBA ҡулланыу хуплана", - "config-db-sys-user-exists-oracle": "Иҫәп яҙмаһы \"$1\". SYSDBA яңы иҫәп-хисап яҙмаһын булдырыу өсөн генә ҡулланыла", "config-postgres-old": "PostgreSQL $1 йәки тағы ла һуңыраҡ булған версия кәрәк. Һеҙҙә PostgreSQL $2 ҡуйылған.", - "config-mssql-old": "$1 йә һуңыраҡ версиянан Microsoft SQL Server кәрәк. Һеҙҙә $2 версияһы ҡуйылған.", "config-sqlite-name-help": "Үҙегеҙҙең вики өсөн исем-идентификатор һайлағыҙ.\nДефисы һәм буш урын ҡалдырмағыҙ.\nЬыл юл SQLite файлының исемендә ҡулланыласаҡ.", "config-sqlite-parent-unwritable-group": "$1 мәғлүмәт директорияһын эшләп булманы, веб-серверҙың төп директорияны яҙырға хоҡуғы юҡ $2.\n\nУрынлаштырыусы ҡатнашыусының веб-серверын билдәләне.\n$3 яҙма мөмкин булған директория эшләгеҙ һәм дауам итегеҙ.\nUnix/Linux системаһында түбәндәгене башҡарығыҙ:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "$1 мәғлүмәт директорияһын эшләп булманы, веб-серверҙың төп директорияны яҙырға хоҡуғы юҡ $2.\n\nУрынлаштырыусы ҡатнашыусының веб-серверын билдәләй алманы.\n$3 яҙма мөмкин булған директория эшләгеҙ һәм дауам итегеҙ.\nUnix/Linux системаһында түбәндәгене башҡарығыҙ:\n\n
cd $2 mkdir $3 chmod a+w $3
", @@ -164,11 +148,6 @@ "config-mysql-engine": "Мәғлүмәт базаһы шыуҙырмаһы", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "Параллель рәүештә яҡшыраҡ эшләгәне өсөн '''InnoDB''' өҫтөнлөрәк.\n\nБер ҡулланыусы йәки төҙәтеүҙәр әҙ булғанда вики өсөн '''MyISAM'''тың тиҙлеге шәберәк, әммә унда мәғлүмәт базаһы InnoDB-ҡа ҡарағанда йышыраҡ сафтан сыға.", - "config-mssql-auth": "Аутентификация төрө :", - "config-mssql-install-auth": "Ҡуйыу процесында мәғлүмәт базаһына инеү өсөн файҙаланылған төп нөсхәне тикшереү тибын һайлағыҙ. \n\nӘгәр «{{int:config-mssql-windowsauth}}» һайлаһығыҙ, ҡулланыусының веб-сервер эшләгән иҫәп яҙмаһы файҙаланыласаҡ.", - "config-mssql-web-auth": "Викиҙың ғәҙәттәге эше ваҡытында мәғлүмәттәр базаһы серверына инеү өсөн веб-сервер файҙаланған төп нөсхәне тикшереү тибын һайлағыҙ. \n\nӘгәр «{{int:config-mssql-windowsauth}}» һайлаһығыҙ, ҡулланыусының веб-сервер эшләгән иҫәп яҙмаһы файҙаланыласаҡ.", - "config-mssql-sqlauth": "SQL Server ысынлығын тикшереү", - "config-mssql-windowsauth": "Windows нөсхәһен тикшереү", "config-site-name": "Вики атамаһы:", "config-site-name-help": "Исеме браузерҙың баш һүҙендә һәм башҡа урындарҙа күрәнәсәк.", "config-site-name-blank": "Сайт исемен яҙығыҙ", diff --git a/includes/installer/i18n/be-tarask.json b/includes/installer/i18n/be-tarask.json index c29f5f7ada..168c937f3d 100644 --- a/includes/installer/i18n/be-tarask.json +++ b/includes/installer/i18n/be-tarask.json @@ -90,13 +90,9 @@ "config-db-type": "Тып базы зьвестак:", "config-db-host": "Хост базы зьвестак:", "config-db-host-help": "Калі сэрвэр вашай базы зьвестак знаходзіцца на іншым сэрвэры, увядзіце тут імя хоста ці IP-адрас.\n\nКалі вы карыстаецеся shared-хостынгам, ваш хостынг-правайдэр мусіць даць вам слушнае імя хоста базы зьвестак у сваёй дакумэнтацыі.\n\nКалі вы ўжываеце MySQL, выкарыстаньне «localhost» можа не працаваць для назвы сэрвэра. У гэтым выпадку паспрабуйце пазначыць «127.0.0.1» для лякальнага IP-адрасу.\n\nКалі вы выкарыстоўваеце PostgreSQL, пакіньце поле пустым, каб далучыцца праз Unix-сокет.", - "config-db-host-oracle": "TNS базы зьвестак:", - "config-db-host-oracle-help": "Увядзіце слушнае [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm лякальнае імя злучэньня]; файл tnsnames.ora павінен быць бачным для гэтага ўсталяваньня.
Калі Вы выкарыстоўваеце кліенцкія бібліятэкі 10g ці больш новыя, Вы можаце таксама выкарыстоўваць мэтад наданьня назваў [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm лёгкае злучэньне].", "config-db-wiki-settings": "Ідэнтыфікацыя гэтай вікі", "config-db-name": "Назва базы зьвестак:", "config-db-name-help": "Выберыце імя для вызначэньня Вашай вікі.\nЯно ня мусіць зьмяшчаць прагалаў.\n\nКалі Вы набываеце shared-хостынг, Ваш хостынг-правайдэр мусіць надаць Вам ці пэўнае імя базы зьвестак для выкарыстаньня, ці магчымасьць ствараць базы зьвестак праз кантрольную панэль.", - "config-db-name-oracle": "Схема базы зьвестак:", - "config-db-account-oracle-warn": "Існуюць тры сцэнары ўсталяваньня Oracle як базы зьвестак для MediaWiki:\n\nКалі Вы жадаеце стварыць рахунак базы зьвестак як частку працэсу ўсталяваньня, калі ласка, падайце рахунак з роляй SYSDBA як рахунак базы зьвестак для ўсталяваньня і пазначце пажаданыя правы рахунку з доступам да Інтэрнэту, у адваротным выпадку Вы можаце таксама стварыць рахунак з доступам да Інтэрнэту ўручную і падаць толькі гэты рахунак (калі патрабуюцца правы для стварэньня схемы аб’ектаў) ці падайце два розных рахункі, адзін з правамі на стварэньне і адзін з абмежаваньнямі для доступу да Інтэрнэту.\n\nСкрыпт для стварэньня рахунку з патрабуемымі правамі можна знайсьці ў дырэкторыі гэтага ўсталяваньня «maintenance/oracle/». Памятайце, што выкарыстаньне рахунку з абмежаваньнямі адключыць усе падтрымліваемыя магчымасьці даступныя па змоўчваньні.", "config-db-install-account": "Імя карыстальніка для ўсталяваньня", "config-db-username": "Імя карыстальніка базы зьвестак:", "config-db-password": "Пароль базы зьвестак:", @@ -115,37 +111,24 @@ "config-pg-test-error": "Немагчыма далучыцца да базы зьвестак '''$1''': $2", "config-sqlite-dir": "Дырэкторыя зьвестак SQLite:", "config-sqlite-dir-help": "SQLite захоўвае ўсе зьвесткі ў адзіным файле.\n\nПададзеная Вамі дырэкторыя павінна быць даступнай да запісу вэб-сэрвэрам падчас усталяваньня.\n\nЯна '''ня''' мусіць быць даступнай праз Сеціва, вось чаму мы не захоўваем яе ў адным месцы з файламі PHP.\n\nПраграма ўсталяваньня дадаткова створыць файл .htaccess, але калі ён не выкарыстоўваецца, хто заўгодна зможа атрымаць зьвесткі з базы зьвестак.\nГэта ўключае як прыватныя зьвесткі ўдзельнікаў (адрасы электроннай пошты, хэшы пароляў), гэтак і выдаленыя вэрсіі старонак і іншыя зьвесткі, доступ да якіх маецца абмежаваны.\n\nПадумайце над тым, каб зьмяшчаць базу зьвестак у іншым месцы, напрыклад у /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Прастора табліцаў па змоўчваньні:", - "config-oracle-temp-ts": "Часовая прастора табліцаў:", "config-type-mysql": "MariaDB, MySQL, або сумяшчальная", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki падтрымлівае наступныя сыстэмы базаў зьвестак:\n\n$1\n\nКалі Вы ня бачыце сыстэму базаў зьвестак, якую Вы спрабуеце выкарыстоўваць ў сьпісе ніжэй, перайдзіце па спасылцы інструкцыі, якая знаходзіцца ніжэй, каб уключыць падтрымку.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] зьяўляецца галоўнай мэтай MediaWiki і падтрымліваецца найлепш. MediaWiki таксама працуе з [{{int:version-db-mysql-url}} MySQL] і [{{int:version-db-percona-url}} Percona Server], якія сумяшчальныя з MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Як скампіляваць PHP з падтрымкай MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] — папулярная сыстэма базы зьвестак з адкрытым кодам, якая зьяўляецца альтэрнатывай MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Як кампіляваць PHP з падтрымкай PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] — невялікая сыстэма базы зьвестак, якая мае вельмі добрую падтрымку. ([https://www.php.net/manual/en/pdo.installation.php Як кампіляваць PHP з падтрымкай SQLite], выкарыстоўвае PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] зьяўляецца камэрцыйнай прафэсійнай базай зьвестак. ([https://www.php.net/manual/en/oci8.installation.php Як скампіляваць PHP з падтрымкай OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] — камэрцыйная база зьвестак для Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Як скампіляваць PHP з падтрымкай SQLSRV])", "config-header-mysql": "Налады MariaDB/MySQL", "config-header-postgres": "Налады PostgreSQL", "config-header-sqlite": "Налады SQLite", - "config-header-oracle": "Налады Oracle", - "config-header-mssql": "Налады Microsoft SQL Server", "config-invalid-db-type": "Няслушны тып базы зьвестак", "config-missing-db-name": "Вы мусіце ўвесьці значэньне парамэтру «{{int:config-db-name}}».", "config-missing-db-host": "Вы мусіце ўвесьці значэньне парамэтру «{{int:config-db-host}}».", - "config-missing-db-server-oracle": "Вы мусіце ўвесьці значэньне парамэтру «{{int:config-db-host-oracle}}».", - "config-invalid-db-server-oracle": "Няслушнае TNS базы зьвестак «$1».\nВыкарыстоўвайце або «TNS Name», або радок «Easy Connect» ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Мэтады найменьня Oracle])", "config-invalid-db-name": "Няслушная назва базы зьвестак «$1».\nНазва можа ўтрымліваць толькі ASCII-літары (a-z, A-Z), лічбы (0-9), сымбалі падкрэсьліваньня(_) і працяжнікі (-).", "config-invalid-db-prefix": "Няслушны прэфікс базы зьвестак «$1».\nЁн можа зьмяшчаць толькі ASCII-літары (a-z, A-Z), лічбы (0-9), сымбалі падкрэсьліваньня (_) і працяжнікі (-).", "config-connection-error": "$1.\n\nПраверце хост, імя карыстальніка і пароль і паспрабуйце зноў. Калі вы ўжываеце «localhost» у якасьці хосту базы зьвестак, паспрабуйце «127.0.0.1» замест (ці наадварот).", "config-invalid-schema": "Няслушная схема для MediaWiki «$1».\nВыкарыстоўвайце толькі ASCII-літары (a-z, A-Z), лічбы (0-9) і сымбалі падкрэсьліваньня (_).", - "config-db-sys-create-oracle": "Праграма ўсталяваньня падтрымлівае толькі выкарыстаньне рахунку SYSDBA для стварэньня новага рахунку.", - "config-db-sys-user-exists-oracle": "Рахунак карыстальніка «$1» ужо існуе. SYSDBA можа выкарыстоўвацца толькі для стварэньня новых рахункаў!", "config-postgres-old": "Патрабуецца PostgreSQL $1 ці навейшая, усталяваная вэрсія $2.", - "config-mssql-old": "Патрабуецца Microsoft SQL Server вэрсіі $1 ці больш позьняй. У вас усталяваная вэрсія $2.", "config-sqlite-name-help": "Выберыце назву, якая будзе ідэнтыфікаваць Вашую вікі.\nНе выкарыстоўвайце прагалы ці злучкі.\nНазва будзе выкарыстоўвацца ў назьве файла зьвестак SQLite.", "config-sqlite-parent-unwritable-group": "Немагчыма стварыць дырэкторыю зьвестак $1, таму што бацькоўская дырэкторыя $2 абароненая ад запісаў вэб-сэрвэра.\n\nПраграма ўсталяваньня вызначыла карыстальніка, які запусьціў вэб-сэрвэр.\nДазвольце запісы ў дырэкторыю $3 для працягу.\nУ сыстэме Unix/Linux зрабіце:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Немагчыма стварыць дырэкторыю зьвестак $1, таму што бацькоўская дырэкторыя $2 абароненая ад запісаў вэб-сэрвэра.\n\nПраграма ўсталяваньня вызначыла карыстальніка, які запусьціў вэб-сэрвэр.\nДазвольце яму (і іншым) запісы ў дырэкторыю $3 для працягу.\nУ сыстэме Unix/Linux зрабіце:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -170,11 +153,6 @@ "config-mysql-engine": "Рухавік сховішча:", "config-mysql-innodb": "InnoDB (рэкамэндавана)", "config-mysql-engine-help": "'''InnoDB''' — звычайна найбольш слушны варыянт, таму што добра падтрымлівае паралелізм.\n\n'''MyISAM''' можа быць хутчэйшай у вікі з адным удзельнікам, ці толькі для чытаньня.\nБазы зьвестак на MyISAM вядомыя тым, што ў іх зьвесткі шкодзяцца нашмат часьцей за InnoDB.", - "config-mssql-auth": "Тып аўтэнтыфікацыі:", - "config-mssql-install-auth": "Абярыце тып аўтэнтыфікацыі, які будзе выкарыстаны для злучэньня з базай зьвестак падчас працэсу ўсталяваньня.\nКалі вы абярэце «{{int:config-mssql-windowsauth}}», будуць выкарыстаныя ўліковыя зьвесткі карыстальніка, пад якім працуе вэб-сэрвэр.", - "config-mssql-web-auth": "Абярыце тып аўтэнтыфікацыі, які вэб-сэрвэр будзе выкарыстоўваць для злучэньня з базай зьвестак падчас звычайнага функцыянаваньня вікі.\nКалі вы абярэце «{{int:config-mssql-windowsauth}}», будуць выкарыстаныя ўліковыя зьвесткі карыстальніка, пад якім працуе вэб-сэрвэр.", - "config-mssql-sqlauth": "Аўтэнтыфікацыя SQL-сэрвэра", - "config-mssql-windowsauth": "Windows-аўтэнтыфікацыя", "config-site-name": "Назва вікі:", "config-site-name-help": "Назва будзе паказвацца ў загалоўку браўзэра і ў некаторых іншых месцах.", "config-site-name-blank": "Увядзіце назву сайта.", diff --git a/includes/installer/i18n/bg.json b/includes/installer/i18n/bg.json index de2f0cb047..ffc534ce8b 100644 --- a/includes/installer/i18n/bg.json +++ b/includes/installer/i18n/bg.json @@ -90,13 +90,9 @@ "config-db-type": "Тип на базата от данни:", "config-db-host": "Сървър на базата от данни:", "config-db-host-help": "Ако базата от данни е на друг сървър, в кутията се въвежда името на хоста или IP адреса.\n\nАко се използва споделен уеб хостинг, доставчикът на услугата би трябвало да е предоставил в документацията си коректния хост.\n\nАко се използва MySQL, използването на „localhost“ може да е неприемливо. В такива случаи се използва „127.0.0.1“ за локален IP адрес.\n\nПри използване на PostgreSQL, това поле се оставя празно, за свързване чрез Unix socket.", - "config-db-host-oracle": "TNS на базата от данни:", - "config-db-host-oracle-help": "Въведете валидно [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]. Файлът tnsnames.ora трябва да бъде видим за инсталацията.
Ако използвате клиентска библиотека версия 10g или по-нова можете да използвате метода [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Идентифициране на това уики", "config-db-name": "Име на базата от данни (без тирета):", "config-db-name-help": "Избира се име, което да идентифицира уикито.\nТо не трябва да съдържа интервали.\n\nАко се използва споделен хостинг, доставчикът на услугата би трябвало да е предоставил или име на базата от данни, която да бъде използвана, или да позволява създаването на бази от данни чрез контролния панел.", - "config-db-name-oracle": "Схема на базата от данни:", - "config-db-account-oracle-warn": "Има три поддържани сценария за инсталиране на Oracle като бекенд база данни:\n\nАко искате да създадете профил в базата данни като част от процеса на инсталиране, моля, посочете профил със SYSDBA като профил в базата данни за инсталиране и посочете желаните данни за влизане (име и парола) за профил с уеб достъп; в противен случай можете да създадете профил с уеб достъп ръчно и предоставите само него (ако той има необходимите права за създаване на схематични обекти), или да предоставите два различни профила - един с привилегии за създаване на обекти, и друг - с ограничения за уеб достъп.\n\nСкрипт за създаването на профил с необходимите привилегии може да се намери в папката „maintenance/oracle/“ на тази инсталация. Имайте в предвид, че използването на ограничен профил ще деактивира всички възможности за обслужване на профила по подразбиране.", "config-db-install-account": "Потребителска сметка за инсталацията", "config-db-username": "Потребителско име за базата от данни:", "config-db-password": "Парола за базата от данни:", @@ -115,34 +111,22 @@ "config-pg-test-error": "Невъзможно свързване с базата данни $1: $2", "config-sqlite-dir": "Директория за данни на SQLite:", "config-sqlite-dir-help": "SQLite съхранява всички данни в един файл.\n\nПо време на инсталацията уеб сървърът трябва да има права за писане в посочената директория.\n\nТя не трябва да е достъпна през уеб, затова не е там, където са PHP файловете.\n\nИнсталаторът ще съхрани заедно с нея файл .htaccess, но ако този метод пропадне, някой може да придобие достъп до суровите данни от базата от данни.\nТова включва сурови данни за потребителите (адреси за е-поща, хеширани пароли), както и изтрити версии на страници и друга чувствителна и с ограничен достъп информация от и за уикито.\n\nБазата от данни е препоръчително да се разположи на друго място, например в /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Таблично пространство по подразбиране:", - "config-oracle-temp-ts": "Временно таблично пространство:", "config-type-mysql": "MariaDB, MySQL (или съвместима)", - "config-type-mssql": "Microsoft SQL сървър", "config-support-info": "МедияУики поддържа следните системи за бази от данни:\n\n$1\n\nАко не виждате желаната за използване система в списъка по-долу, следвайте инструкциите за активиране на поддръжка по-горе.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] е най-важна за МедияУики и се поддържа най-добре. МедияУики работи също така с [{{int:version-db-mysql-url}} MySQL] и [{{int:version-db-percona-url}} Percona Server], които са съвместими с MariaDB.\n([https://www.php.net/manual/en/mysqli.installation.php Как се компилира PHP с поддръжка на MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] е популярна система за управление на бази от данни, алтернатива на MySQL. ([https://www.php.net/manual/bg/pgsql.installation.php Как се компилира PHP с поддръжка на PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] е олекотена система за бази от данни, която е много добре поддържана. ([https://www.php.net/manual/en/pdo.installation.php Как се компилира PHP с поддръжка на SQLite], използва PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] е комерсиална корпоративна база от данни. ([https://www.php.net/manual/en/oci8.installation.php Как се компилира PHP с поддръжка на OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] е комерсиална корпоративна база от данни за Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Как да се компилира PHP с поддръжка на SQLSRV])", "config-header-mysql": "Настройки на MariaDB/MySQL", "config-header-postgres": "Настройки за PostgreSQL", "config-header-sqlite": "Настройки за SQLite", - "config-header-oracle": "Настройки за Oracle", - "config-header-mssql": "Настройки за Microsoft SQL сървър", "config-invalid-db-type": "Невалиден тип база от данни", "config-missing-db-name": "Необходимо е да се въведе стойност за „{{int:config-db-name}}“.", "config-missing-db-host": "Необходимо е да се въведе стойност за „{{int:config-db-host}}“.", - "config-missing-db-server-oracle": "Необходимо е да се въведе стойност за „{{int:config-db-host-oracle}}“.", - "config-invalid-db-server-oracle": "Невалиден TNS на базата от данни „$1“.\nИзползвайте „TNS Name“ или „Easy Connect“ ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Методи за именуване на Oracle])", "config-invalid-db-name": "Невалидно име на базата от данни „$1“.\nИзползват се само ASCII букви (a-z, A-Z), цифри (0-9), долни черти (_) и тирета (-).", "config-invalid-db-prefix": "Невалидна представка за базата от данни „$1“.\nПозволени са само ASCII букви (a-z, A-Z), цифри (0-9), долни черти (_) и тирета (-).", "config-connection-error": "$1.\n\nНеобходимо е да се проверят хостът, потребителското име и паролата, след което да се опита отново. Ако използвате „localhost“ като хост на базата от данни, опитайте с „127.0.0.1“ вместо него (и обратно).", "config-invalid-schema": "Невалидна схема за МедияУики „$1“.\nДопустими са само ASCII букви (a-z, A-Z), цифри (0-9) и долни черти (_).", - "config-db-sys-create-oracle": "Инсталаторът поддържа само сметка SYSDBA за създаване на нова сметка.", - "config-db-sys-user-exists-oracle": "Потребителската сметка „$1“ вече съществува. SYSDBA може да се използва само за създаване на нова сметка!", "config-postgres-old": "Изисква се PostgreSQL $1 или по-нова версия, наличната версия е $2.", - "config-mssql-old": "Изисква се Microsoft SQL Server версия $1 или по-нова. Вашата версия е $2.", "config-sqlite-name-help": "Избира се име, което да идентифицира уикито.\nНе се използват интервали или тирета.\nТова име ще се използва за име на файла за данни на SQLite.", "config-sqlite-parent-unwritable-group": "Директорията за данни $1 не може да бъде създадена, тъй като уеб сървърът няма права за писане в родителската директория $2.\n\nИнсталаторът разпознава потребителското име, с което работи уеб сървърът.\nУверете се, че той притежава права за писане в директорията $3 преди да продължите.\nВ Unix/Линукс системи можете да използвате:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Директорията за данни $1 не може да бъде създадена, тъй като уеб сървърът няма права за писане в родителската директория $2.\n\nИнсталаторът не може да определи потребителското име, с което работи уеб сървърът.\nУверете се, че в директория $3 може да бъде писано от уеб сървъра (или от други потребители!) преди да продължите.\nНа Unix/Линукс системи можете да използвате:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -167,11 +151,6 @@ "config-mysql-engine": "Хранилище на данни:", "config-mysql-innodb": "InnoDB (препоръчително)", "config-mysql-engine-help": "InnoDB почти винаги е най-добрата възможност заради навременната си поддръжка.\n\nMyISAM може да е по-бърза при инсталации с един потребител или само за четене.\nБазите от данни MyISAM се повреждат по-често от InnoDB.", - "config-mssql-auth": "Тип на удостоверяването:", - "config-mssql-install-auth": "Изберете начин за удостоверяване, който ще бъде използван за връзка с базата от данни по време на инсталацията.\nАко изберете \"{{int:config-mssql-windowsauth}}\", ще се използват идентификационните данни на потребителя под който работи уеб сървъра.", - "config-mssql-web-auth": "Изберете начина за удостоверяване, който ще се използва от уеб сървъра за връзка със сървъра за бази от данни по време на нормалните операции на уикито.\nАко изберете \"{{int:config-mssql-windowsauth}}\", ще се използват идентификационните данни на потребителя под който работи уеб сървъра.", - "config-mssql-sqlauth": "Удостоверяване чрез SQL Server", - "config-mssql-windowsauth": "Удостоверяване чрез Windows", "config-site-name": "Име на уикито:", "config-site-name-help": "Това име ще се показва в заглавната лента на браузъра и на различни други места.", "config-site-name-blank": "Необходимо е да се въведе име на уикито.", diff --git a/includes/installer/i18n/bn.json b/includes/installer/i18n/bn.json index 0debe4a0ed..b8a467c3c1 100644 --- a/includes/installer/i18n/bn.json +++ b/includes/installer/i18n/bn.json @@ -68,26 +68,20 @@ "config-db-schema": "মিডিয়াউইকির জন্য স্কিমা (হাইফেন ছাড়া):", "config-pg-test-error": "উপাত্তশালা $1-এর সাথে সংযোগ দেয়া সম্ভব হয়নি। কারন:$2", "config-sqlite-dir": "SQLite উপাত্ত ডিরেক্টরি:", - "config-oracle-def-ts": "পূর্বনির্ধারিত টেবিলস্পেস", - "config-oracle-temp-ts": "সাময়কি টেবিলস্পেস:", "config-type-mysql": "MariaDB, MySQL, বা উপযুক্তগুলি", - "config-type-mssql": "মাইক্রোসফট SQL সার্ভার", "config-dbsupport-postgres": "* MySQL-এর বিকল্প হিসেবে [{{int:version-db-postgres-url}} PostgreSQL] হচ্ছে একটি জনপ্রিয় মুক্ত উৎসের ডাটাবেস ব্যবস্থা। ([https://www.php.net/manual/en/pgsql.installation.php PostgreSQL সমর্থনসহ কিভাবে PHP সঙ্কলন করবেন])", "config-header-mysql": "MariaDB/MySQL সেটিং", "config-header-postgres": "PostgreSQL সেটিংস", "config-header-sqlite": "SQLite সেটিংস", - "config-header-oracle": "ওরাকল সেটিংস", "config-invalid-db-type": "ডেটাবেজের ধরন অগ্রহযোগ্য", "config-missing-db-name": "আপনাকে অবশ্যই \"{{int:config-db-name}}\"-এর জন্য একটি মান প্রবেশ করাতে হবে।", "config-missing-db-host": "আপনাকে অবশ্যই \"{{int:config-db-host}}\"-এর জন্য একটি মান প্রবেশ করাতে হবে।", - "config-missing-db-server-oracle": "আপনাকে অবশ্যই \"{{int:config-db-host-oracle}}\"-এর জন্য একটি মান প্রবেশ করাতে হবে।", "config-connection-error": "$1।\n\n\nদয়া করে প্রস্তাবকারী, ব্যবহারকারী নাম ও পাসওয়ার্ড দেখুন এবং পুনরায় চেষ্টা করুন।", "config-sqlite-readonly": "ফাইল $1 লিখনযোগ্য নয়।", "config-sqlite-cant-create-db": "ডাটাবেজ ফাইল $1 তৈরি করা যায়নি।", "config-regenerate": "LocalSettings.php পুনরূত্পাদিত করুন →", "config-mysql-engine": "সংগ্রহস্থল ইঞ্জিন:", "config-mysql-innodb": "InnoDB (সুপারিশকৃত)", - "config-mssql-windowsauth": "উইন্ডোজ প্রমাণীকরণ", "config-site-name": "উইকির নাম:", "config-site-name-blank": "একটি সাইটের নাম প্রবেশ করান।", "config-project-namespace": "প্রকল্প নামস্থান:", diff --git a/includes/installer/i18n/br.json b/includes/installer/i18n/br.json index de6655b3e7..b9fb7b84e0 100644 --- a/includes/installer/i18n/br.json +++ b/includes/installer/i18n/br.json @@ -84,13 +84,9 @@ "config-db-type": "Doare an diaz roadennoù :", "config-db-host": "Anv implijer an diaz roadennoù :", "config-db-host-help": "M'emañ ho servijer roadennoù war ur servijer disheñvel, merkit amañ anv an ostiz pe ar chomlec'h IP.\n\nMa rit gant un herberc'hiañ kenrannet, e tlefe ho herberc'hier bezañ pourchaset deoc'h an anv ostiz reizh en teulioù titouriñ.\n\nM'emaoc'h o staliañ ur servijer Windows ha ma rit gant MySQL, marteze ne'z aio ket en-dro \"localhost\" evel anv servijer. Ma ne dro ket, klaskit ober gant \"127.0.0.1\" da chomlec'h IP lechel.", - "config-db-host-oracle": "TNS an diaz roadennoù :", - "config-db-host-oracle-help": "Merkit un [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm anv kevreañ lec'hel] reizh; dleout a ra ur restr tnsnames.ora bezañ hewel e-pad ar staliadur.
Ma rit gant al levraouegoù arval 10g pe nevesoc'h e c'hallit ivez ober gant an hentenn envel [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Anavezout ar wiki-mañ", "config-db-name": "Anv an diaz roadennoù :", "config-db-name-help": "Dibabit un anv evit ho wiki.\nNa lakait ket a esaouennoù ennañ.\n\nMa ri gant un herberc'hiañ kenrannet e vo pourchaset deoc'h un anv diaz roadennoù dibar da vezañ graet gantañ gant ho herberc'hier pe e lezo ac'hanoc'h da grouiñ diazoù roadennoù dre ur banell gontrolliñ.", - "config-db-name-oracle": "Brastres diaz roadennoù :", - "config-db-account-oracle-warn": "Skoret ez eus tri doare evit staliañ Oracle da v/backend diaz roadennoù :\n\nMar fell deoc'h krouiñ ur gont diaz roadennoù e-ser an argerzh staliañ eo rekis pourchas ur gont gant ur roll SYSDBA evel kont diaz roadennoù evit ar staliañ, ha spisaat an titouroù anaout a fell deoc'h evit ar gont moned ouzh ar web. A-hend-all, e c'hallit krouiñ ar gont moned ouzh ar web gant an dorn ha pourchas hepken ar gont-se (ma'z eus bet ranket diskouez aotreoù ret evit krouiñ traezoù ar brastres) pe pourveziñ div gont disheñvel, unan gant dreistwirioù krouiñ hag eben, gant gwirioù strishaet, evit moned ouzh ar web.\n\nGallout a reer kaout ar skript evit kouiñ ur gont a zo rekis dreistwirioù eviti e kavlec'h \"trezalc'h/oracle/\" ar staliadur-mañ. Na zisoñjit ket e vo diweredekaet holl varregezhioù trezalc'h ar gont dre ziouer ma rit gant ur gont strishaet he gwirioù.", "config-db-install-account": "Kont implijer evit ar staliadur", "config-db-username": "Anv implijer an diaz roadennoù :", "config-db-password": "Ger-tremen an diaz roadennoù :", @@ -109,37 +105,24 @@ "config-pg-test-error": "N'haller ket kevreañ ouzh an diaz-titouroù '''$1''' : $2", "config-sqlite-dir": "Kavlec'h roadennoù SQLite :", "config-sqlite-dir-help": "Stokañ a ra SQLite an holl roadennoù en ur restr nemetken.\n\nE-pad ar staliañ, rankout a ra ar servijer web gallout skrivañ er c'havlec'h pourchaset ganeoc'h.\n\nNe zlefe ket bezañ tizhadus dre ar web; setu perak ne lakaomp ket anezhañ el lec'h m'emañ ho restroù PHP.\n\nSkivañ a raio ar stalier ur restr .htaccess war un dro gantañ met ma c'hoarvez ur fazi e c'hallfe unan bennak tapout krog en ho roadennoù.\nKement-se a sell ouzh ar roadennoù implijer (chomlec'hioù postel, gerioù-tremen hachet) hag ouzh an adweladennoù diverket ha takadoù gwarzeet all eus ar wiki.\n\nEn em soñjit ha ne vefe ket gwelloc'h lakaat an diaz roadennoù en un tu bennak all, da skouer e /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Esaouenn stokañ (\"tablespace\") dre ziouer :", - "config-oracle-temp-ts": "Esaouenn stokañ (''tablespace'') da c'hortoz :", "config-type-mysql": "MySQL (pe kenglotus)", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "Skoret eo ar reizhiadoù diaz titouroù da-heul gant MediaWiki :\n\n$1\n\nMa ne welit ket amañ dindan ar reizhiad diaz titouroù a fell deoc'h ober ganti, heuilhit an titouroù a-us (s.o. al liammoù) evit gweredekaat ar skorañ.", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] eo an dibab kentañ evit MediaWiki hag an hini skoret ar gwellañ. Mont a ra MediaWiki en-dro gant [{{int:version-db-mariadb-url}} MariaDB] ha [{{int:version-db-percona-url}} Percona Server] ivez, kenglotus o-daou gant MySQL. ([https://www.php.net/manual/en/mysqli.installation.php Penaos kempunañ PHP gant skor MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] zo anezhi ur reizhiad diaz roadennoù frank a wirioù brudet-mat a c'haller ober gantañ e plas MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Penaos kempunañ PHP gant skor PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] zo anezhi ur reizhiad diaz roadennoù skañv skoret eus ar c'hentañ. ([http://www.php.net/manual/en/pdo.installation.php Penaos kempunañ PHP gant skor SQLite], implijout a ra PDO)", - "config-dbsupport-oracle": "* Un embregerezh kenwerzhel diaz roadennoù eo [{{int:version-db-oracle-url}} Oracle]. ([http://www.php.net/manual/en/oci8.installation.php Penaos kempunañ PHP gant skor OCI8])", - "config-dbsupport-mssql": "* Un embregerezh kenwerzhel diaz roadennoù evit Windows eo [{{int:version-db-mssql-url}} Microsoft SQL Server]. ([https://www.php.net/manual/en/sqlsrv.installation.php Penaos kempunañ PHP gant skor SQLSRV])", "config-header-mysql": "Arventennoù MySQL", "config-header-postgres": "Arventennoù PostgreSQL", "config-header-sqlite": "Arventennoù SQLite", - "config-header-oracle": "Arventennoù Oracle", - "config-header-mssql": "Arventennoù Microsoft SQL Server", "config-invalid-db-type": "Direizh eo ar seurt diaz roadennoù", "config-missing-db-name": "Ret eo deoc'h merkañ un dalvoudenn evit \"{{int:config-db-name}}\".", "config-missing-db-host": "Ret eo deoc'h merkañ un dalvoudenn evit \"{{int:config-db-host}}\"", - "config-missing-db-server-oracle": "Ret eo deoc'h merkañ un dalvoudenn evit \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "Direizh eo anv TNS an diaz roadennoù \"$1\".\nOber gant an neudennad \"TNS Name\" pe c'hoazh gant \"Easy Connect ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Hentennoù envel Oracle]).", "config-invalid-db-name": "Direizh eo anv an diaz titouroù \"$1\".\nOber hepken gant lizherennoù ASCII (a-z, A-Z), sifroù (0-9), arouezennoù islinennañ (_) ha tiredoù (-).", "config-invalid-db-prefix": "Direizh eo rakger an diaz titouroù \"$1\".\nOber hepken gant lizherennoù ASCII (a-z, A-Z), sifroù (0-9), arouezennoù islinennañ (_) ha tiredoù (-).", "config-connection-error": "$1.\n\nGwiriit anv an ostiz, an anv implijer, ar ger-tremen ha klaskit en-dro.", "config-invalid-schema": "Chema direizh evit MediaWiki \"$1\".\nGrit hepken gant lizherennoù ASCII (a-z, A-Z), sifroù (0-9) hag arouezennoù islinennañ (_).", - "config-db-sys-create-oracle": "N'anavez ar stalier nemet ar c'hontoù SYSDBA evit krouiñ kontoù nevez.", - "config-db-sys-user-exists-oracle": "Bez' ez eus eus ar gont \"$1\" c'hoazh. N'haller ober gant SYSDBA nemet evit krouiñ kontoù nevez !", "config-postgres-old": "Rekis eo PostgreSQL $1 pe ur stumm nevesoc'h; ober a rit gant $2.", - "config-mssql-old": "Stumm $1 Microsoft SQL Server, pe unan nevesoc'h, zo rekis. Ganeoc'h emañ ar stumm $2.", "config-sqlite-name-help": "Dibabit un anv dibar d'ho wiki.\nArabat ober gant esaouennoù pe barrennigoù-stagañ.\nImplijet e vo evit ar restr roadennoù SQLite.", "config-sqlite-parent-unwritable-group": "N'haller ket krouiñ ar c'havlec'h roadennoù $1 peogwir n'hall ket ar servijer Web skrivañ war ar c'havlec'h kar $2.\n\nKavet eo bet gant ar stalier an anv implijer m'eo oberiant ar servijer drezañ. Evit gallout kenderc'hel, lakait ar c'havlec'h $3 da vezañ tizhus evit ar skrivañ.\nWar ur reizhiad Unix/Linux system ober :\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "N'haller ket krouiñ ar c'havlec'h roadennoù $1 peogwir n'hall ket ar servijer Web skrivañ war ar c'havlec'h kar $2.\n\nN'eo ket bet ar servijer evit kavout anv an implijer ma tro ar servijer. Evit kenderc'hel, lakaat ar c'havlec'h $3 da vezañ tizhus evit ar skrivañ dre vras.\nWar ur reizhiad Unix/Linux merkañ :\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -163,11 +146,6 @@ "config-mysql-engine": "Lusker stokañ :", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "InnoDB eo an dibab gwellañ koulz lavaret atav, kemer a ra e kont ar monedoù kevezus.\n\nMyISAM a c'hall bezañ fonnusoc'h evit ar staliadurioù unpost pe ar re lenn hepken.\nDiazoù roadennoù MyISAM zo techet da vezañ gwastet aliesoc'h eget re InnoDB.", - "config-mssql-auth": "Seut anaoudadur :", - "config-mssql-install-auth": "Diuzañ ar seurt dilesa a vo implijet evit kevreañ ouzh an diaz roadennoù e-pad ar staliañ.\nMa tibabit \"{{int:config-mssql-windowsauth}}\", e vo implijet titouroù anaout an implijer a laka ar servijer da dreiñ.", - "config-mssql-web-auth": "Diuzañ ar seurt dilesa a vo implijet gant ar servijer web evit kevreañ ouzh diaz roadennoù ar servijer e-pad oberiadennoù boas ar wiki.\nMa tibabit \"{{int:config-mssql-windowsauth}}\", e vo implijet titouroù anaout an implijer a laka ar servijer da dreiñ.", - "config-mssql-sqlauth": "Anaoudadur SQL Server", - "config-mssql-windowsauth": "Anaoudadur Windows", "config-site-name": "Anv ar wiki :", "config-site-name-help": "Dont a raio war wel e barrenn ditl ar merdeer hag e meur a lec'h all c'hoazh.", "config-site-name-blank": "Lakait anv ul lec'hienn .", diff --git a/includes/installer/i18n/bs.json b/includes/installer/i18n/bs.json index 50421abb9c..5228e59e0d 100644 --- a/includes/installer/i18n/bs.json +++ b/includes/installer/i18n/bs.json @@ -64,7 +64,6 @@ "config-db-host": "Domaćin baze podataka:", "config-db-wiki-settings": "Identificiraj ovu wiki", "config-db-name": "Naziv baze podataka:", - "config-db-name-oracle": "Šema baze podataka:", "config-db-install-account": "Korisnički račun za instalaciju", "config-db-username": "Korisničko ime baze podataka:", "config-db-password": "Lozinka baze podataka:", @@ -75,22 +74,14 @@ "config-db-schema": "Šema za MediaWiki:", "config-pg-test-error": "Ne mogu se povezati na bazu podataka $1: $2", "config-sqlite-dir": "Folder za SQLite-podatke:", - "config-oracle-def-ts": "Predodređeni tabelarni prostor:", - "config-oracle-temp-ts": "Privremeni tabelarni prostor:", "config-type-mysql": "MySQL (ili kompaktibilan)", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "Postavke MySQL-a", "config-header-postgres": "Postavke PostgreSQL-a", "config-header-sqlite": "Postavke SQLite-a", - "config-header-oracle": "Postavke Oraclea", - "config-header-mssql": "Postavke Microsoft SQL Servera", "config-invalid-db-type": "Nevažeća vrsta baze podataka.", "config-missing-db-name": "Morate unijeti vrijednost za \"{{int:config-db-name}}\".", "config-missing-db-host": "Morate unijeti vrijednost za \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Morate unijeti vrijednost za \"{{int:config-db-host-oracle}}\".", - "config-db-sys-create-oracle": "Program za instalaciju podržava samo upotrebu SYSDBA-računa za pravljenje novih računa.", "config-postgres-old": "Zahtijeva se PostgreSQL $1 ili noviji. Vi imate $2.", - "config-mssql-old": "Zahtijeva se Microsoft SQL Server $1 ili noviji. Vi imate $2.", "config-sqlite-name-help": "Izaberite ime koje će predstavljati Vaš wiki.\nNemojte koristiti razmake i crte.\nOvo će se koristiti za ime datoteke SQLite-podataka.", "config-sqlite-readonly": "Datoteka $1 nije zapisiva.", "config-sqlite-cant-create-db": "Ne mogu napraviti datoteku $1 za bazu podataka.", @@ -104,7 +95,6 @@ "config-db-web-create": "Napravi račun ako već ne postoji", "config-mysql-engine": "Skladišni pogon:", "config-mysql-innodb": "InnoDB", - "config-mssql-auth": "Vrsta autentifikacije:", "config-site-name": "Ime wikija:", "config-site-name-blank": "Upišite ime sajta.", "config-project-namespace": "Imenski prostor projekta:", diff --git a/includes/installer/i18n/bto.json b/includes/installer/i18n/bto.json index 19d6e45b10..50a6040523 100644 --- a/includes/installer/i18n/bto.json +++ b/includes/installer/i18n/bto.json @@ -22,21 +22,15 @@ "config-diff3-bad": "Diri nataurakan a GNU diff3.", "config-db-type": "Klase ka database:", "config-db-host": "Host ka database:", - "config-db-host-oracle": "Database ka TNS:", "config-db-wiki-settings": "Mibdiron adin wiki", "config-db-name": "Ngaran ka database:", "config-db-port": "Port ka database:", "config-db-schema": "Skema para sa MediaWiki:", "config-sqlite-dir": "Direktoryo ka data sa SQLite:", - "config-oracle-def-ts": "Dating tablescape:", - "config-oracle-temp-ts": "Temporaryong tablescape:", "config-type-mysql": "MySQL (o compatible)", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "MySQL settings", "config-header-postgres": "PostgreSQL settings", "config-header-sqlite": "SQLite settings", - "config-header-oracle": "Oracle settings", - "config-header-mssql": "Microsoft SQL Server settings", "config-mysql-innodb": "InnoDB", "config-site-name": "Ngaran ka wiki", "config-site-name-blank": "Ibutang a ngaran ka site.", diff --git a/includes/installer/i18n/ca.json b/includes/installer/i18n/ca.json index d56295ba6b..04d99355b7 100644 --- a/includes/installer/i18n/ca.json +++ b/includes/installer/i18n/ca.json @@ -92,11 +92,9 @@ "config-db-type": "Tipus de base de dades:", "config-db-host": "Servidor de la base de dades:", "config-db-host-help": "Si el servidor de base de dades és en un servidor diferent, introduïu el nom del servidor o l'adreça IP a continuació.\n\nSi feu servir un hostatge web compartit, el vostre proveïdor us hauria de proporcionar el nom del servidor a la documentació.\n\nSi feu servir MySQL, «localhost» podria no funcionar com a nom de servidor. Si no funciona, proveu «127.0.0.1» com a adreça IP local.\n\nSi feu servir PostgreSQL, deixeu aquest camp en blanc per a connectar-vos a través d'un sòcol Unix.", - "config-db-host-oracle": "TNS de la base de dades:", "config-db-wiki-settings": "Identifica aquest wiki", "config-db-name": "Nom de la base de dades (sense guionets):", "config-db-name-help": "Trieu un nom que identifiqui el wiki.\nNo ha de contenir espais.\n\nSi esteu fent servir un hostatge web compartit, el vostre proveïdor us proporcionarà un nom específic per a la base de dades o us permetrà crear base de dades des d'un tauler de control.", - "config-db-name-oracle": "Esquema de la base de dades:", "config-db-install-account": "Compte d'usuari per a la instal·lació", "config-db-username": "Nom d'usuari de la base de dades:", "config-db-password": "Contrasenya de la base de dades:", @@ -115,28 +113,19 @@ "config-pg-test-error": "No es pot connectar a la base de dades '''$1''': $2", "config-sqlite-dir": "Directori de dades de l'SQLite", "config-sqlite-dir-help": "L'SQLite emmagatzema totes les dades en un únic fitxer.\n\nEl directori que proporcioneu ha de ser escrivible pel servidor durant la instal·lació.\n\nNo hauria de ser accessible des del web. Aquest és el motiu perquè no el posem on són els fitxers PHP.\n\nL'instal·lador escriurà un fitxer .htaccess al mateix temps, però si això fallés, seria possible que s'accedís a la base de dades crua.\nAixò inclou dades d'usuari crues (adreces electròniques, contrasenyes en resum) així com revisions eliminades i altres dades restringida en el wiki.\n\nConsidereu posar la base de dades en algun altre lloc tot plegat, per exemple a /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Espai de taules per defecte:", - "config-oracle-temp-ts": "Espai de taules temporal:", "config-type-mysql": "MariaDB, MySQL o compatible", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki és compatible amb els següents sistemes de bases de dades:\n$1\nSi el sistema de bases de dades que intenteu utilitzar no apareix a la llista, seguiu les instruccions enllaçades més amunt per habilitar el suport.", "config-header-mysql": "Paràmetres de MariaDB/MySQL", "config-header-postgres": "Paràmetres del PostgreSQL", "config-header-sqlite": "Paràmetres de l'SQLite", - "config-header-oracle": "Paràmetres de l'Oracle", - "config-header-mssql": "Paràmetres del Microsoft SQL Server", "config-invalid-db-type": "Tipus de base de dades no vàlid", "config-missing-db-name": "Heu d'introduir un valor per a «{{int:config-db-name}}».", "config-missing-db-host": "Heu d'introduir un valor per a «{{int:config-db-host}}».", - "config-missing-db-server-oracle": "Heu d’introduir un valor per a «{{int:config-db-host-oracle}}».", "config-invalid-db-name": "El nom de la base de dades, «$1», no és vàlid.\nUtilitzeu només lletres de l’ASCII (a-z, A-Z), xifres (0-9), guions baixos (_) i guionets (-).", "config-invalid-db-prefix": "El prefix de la base de dades, «$1», no és vàlid.\nUtilitzeu només lletres de l’ASCII (a-z, A-Z), xifres (0-9), guions baixos (_) i guionets (-).", "config-connection-error": "$1.\n\nComproveu el servidor central, el nom d'usuari i la contrasenya i torneu-ho a provar. Si feu servir «localhost» com a servidor de base de dades, proveu llavors d'utilitzar «127.0.0.1» (o a l'inrevés).", "config-invalid-schema": "L’esquema «$1» no és vàlid per al MediaWiki.\nUtilitzeu només lletres de l’ASCII (a-z, A-Z), xifres (0-9), guions baixos (_) i guionets (-).", - "config-db-sys-create-oracle": "L'instal·lador només accepta emprar un compte SYSDBA per a la creació d'un nou compte.", - "config-db-sys-user-exists-oracle": "El compte d’usuari «$1» ja existeix. SYSDBA només es pot fer servir per crear comptes nous.", "config-postgres-old": "Cal el PostgreSQL $1 o posterior. Teniu el $2.", - "config-mssql-old": "Cal utilitzar el Microsoft SQL Server $1 o posterior. Teniu la versió $2.", "config-sqlite-name-help": "Trieu un nom per identificar el wiki.\nNo feu servir espais ni guionets.\nAquest nom s’utilitzarà per a denominar el fitxer de les dades de l’SQLite.", "config-sqlite-parent-unwritable-group": "No es pot crear el directori de dades $1, perquè el directori pare $2 no el pot escriure el servidor web.\n\nL'instal·lador no pot determinar l'usuari amb què s'executa el servidor web.\nFeu el directori $3 escrivible globalment per l'usuari del servidor web (i altres) per continuar.\nEn un sistema Unix/Linux feu:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "No es pot crear el directori de dades $1, perquè el directori pare $2 no el pot escriure el servidor web.\n\nL'instal·lador no pot determinar l'usuari amb què s'executa el servidor web.\nFeu el directori $3 escrivible globalment per l'usuari del servidor web (i altres) per continuar.\nEn un sistema Unix/Linux feu:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -161,11 +150,6 @@ "config-mysql-engine": "Motor d'emmagatzemament:", "config-mysql-innodb": "InnoDB (recomanat)", "config-mysql-engine-help": "InnoDB és gairebé sempre la millor opció perquè té una bona implementació de concurrència.\n\nMyISAM pot ser més ràpid en instal·lacions d'un únic usuari o de només lectura.\nLes bases de dades MyISAM tendeixen a corrompre's més sovint que les InnoDB.", - "config-mssql-auth": "Tipus d'autenticació:", - "config-mssql-install-auth": "Seleccioneu el tipus d'autenticació que s'utilitzarà per connectar-se amb el servidor de base de dades durant el procés d'instal·lació.\nSi seleccioneu «{{int:config-mssql-windowsauth}}», s'utilitzaran les credencials de l'usuari amb què s'executa el servidor web.", - "config-mssql-web-auth": "Seleccioneu el tipus d'autenticació que utilitzarà el servidor web per connectar-se amb el servidor de base de dades durant les operacions rutinàries del wiki.\nSi seleccioneu «{{int:config-mssql-windowsauth}}», s'utilitzaran les credencials de l'usuari amb què s'executa el servidor web.", - "config-mssql-sqlauth": "Autenticació de l’SQL Server", - "config-mssql-windowsauth": "Autenticació del Windows", "config-site-name": "Nom del wiki:", "config-site-name-help": "Això apareixerà en la barra de títol del navegador i en altres llocs diferents.", "config-site-name-blank": "Introduïu un nom per al lloc.", diff --git a/includes/installer/i18n/ce.json b/includes/installer/i18n/ce.json index baba3e2ec5..5e778fa293 100644 --- a/includes/installer/i18n/ce.json +++ b/includes/installer/i18n/ce.json @@ -31,15 +31,10 @@ "config-no-fts3": "'''Тергам бе''': SQLite гулйина хуттург йоцуш [//sqlite.org/fts3.html FTS3] — лахар болхбеш хир дац оцу бухца.", "config-no-cli-uri": "'''ДӀахьедар''': --scriptpath параметр язйина яц, иза Ӏадйитаран кепаца лелош ю: $1 .", "config-db-name": "Хаамийн базан цӀе:", - "config-type-mssql": "Microsoft SQL Server", - "config-header-mssql": "Microsoft SQL Server параметраш", "config-invalid-db-type": "Хаамийн базан нийса йоцу тайп", "config-missing-db-name": "Ахьа «{{int:config-db-name}}» маьӀна даздан дезаш ду.", "config-missing-db-host": "Ахьа «{{int:config-db-host}}» параметран маьӀна даздан дезаш ду.", - "config-missing-db-server-oracle": "Ахьа тӀеюза езаш ю «{{int:config-db-host-oracle}}»", - "config-invalid-db-server-oracle": "Хаамийн базан «$1» нийса йоцу TNS.\nЛелае «TNS Name», я могӀа «Easy Connect» ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm ЦӀерш техкаран кеп Oracle])", "config-sqlite-fts3-downgrade": "PHPн гӀо до FTS3 яц — кхуссу таблицаш", - "config-mssql-auth": "Аутентификацин тайп:", "config-site-name": "Викин цӀе:", "config-site-name-blank": "Язъе сайтан цӀе.", "config-project-namespace": "Проектан цӀерийн меттиг:", diff --git a/includes/installer/i18n/cs.json b/includes/installer/i18n/cs.json index aef912c462..e13c506891 100644 --- a/includes/installer/i18n/cs.json +++ b/includes/installer/i18n/cs.json @@ -96,13 +96,9 @@ "config-db-type": "Typ databáze:", "config-db-host": "Databázový server:", "config-db-host-help": "Pokud je váš databázový server na jiném počítači, zadejte zde jméno stroje nebo IP adresu.\n\nPokud používáte sdílený webový hosting, váš poskytovatel by vám měl v dokumentaci sdělit správné jméno stroje.\n\nPokud používáte MySQL, jméno „localhost“ nemusí fungovat. V takovém případě zkuste jako místní IP adresu zadat „127.0.0.1“.\n\nPokud používáte PostgreSQL, můžete se připojit Unixovými sockety tak, že toto pole necháte prázdné.", - "config-db-host-oracle": "Databázové TNS:", - "config-db-host-oracle-help": "Zadejte platné [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; tato instalace musí vidět soubor tnsnames.ora.
Pokud používáte klientské knihovny verze 10g nebo novější, můžete také používat názvy [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifikace této wiki", "config-db-name": "Jméno databáze (bez spojovníků):", "config-db-name-help": "Zvolte jméno, které označuje vaši wiki.\nNemělo by obsahovat mezery.\n\nPokud používáte sdílený webový hosting, váš poskytovatel vám buď sdělí konkrétní jméno databáze, nebo vás nechá vytvářet databáze pomocí nějakého ovládacího panelu.", - "config-db-name-oracle": "Databázové schéma:", - "config-db-account-oracle-warn": "Existují tři podporované možnosti pro instalaci s použitím databáze Oracle.\n\nPokud chcete v rámci instalace založit databázový účet, zadejte jako databázový účet pro instalaci účet s rolí SYSDBA a uveďte požadované údaje pro účet pro webový přístup, jinak můžete vytvořit účet pro webový přístup ručně a zadat pouze tento účet (pokud má dostatečná oprávnění k zakládání objektů schématu) nebo poskytnout dva různé účty, jeden s oprávněními k zakládání, druhý omezený pro webový přístup.\n\nSkript pro založení účtu s potřebnými privilegii můžete v této instalaci nalézt v adresáři „maintenance/oracle/“. Nezapomeňte, že použití omezeného účtu znepřístupní veškeré možnosti údržby přes implicitní účet.", "config-db-install-account": "Uživatelský účet pro instalaci", "config-db-username": "Databázové uživatelské jméno:", "config-db-password": "Databázové heslo:", @@ -121,37 +117,24 @@ "config-pg-test-error": "Nelze se připojit k databázi '''$1''': $2", "config-sqlite-dir": "Adresář pro data SQLite:", "config-sqlite-dir-help": "SQLite ukládá veškerá data v jediném souboru.\n\nZadaný adresář musí být v průběhu instalace být přístupný pro zápis.\n\n'''Neměl by''' být dostupný z webu, proto ho nedáváme tam, kde jsou vaše PHP soubory.\n\nInstalátor do adresáře přidá soubor .htaccess, ale pokud to selže, mohl by někdo získat přístup k vaší holé databázi.\nTo zahrnuje syrová uživatelská data (e-mailové adresy, hašovaná hesla), jako i smazané revize a další data s omezeným přístupem z vaší wiki.\n\nZvažte umístění databáze někam zcela jinam, například do /var/lib/mediawiki/mojewiki.", - "config-oracle-def-ts": "Implicitní tabulkový prostor:", - "config-oracle-temp-ts": "Dočasný tabulkový prostor:", "config-type-mysql": "MariaDB, MySQL nebo kompatibilní", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki podporuje následující databázové systémy:\n\n$1\n\nPokud v nabídce níže nevidíte databázový systém, který chcete použít, musíte pro zapnutí podpory následovat instrukce odkázané výše.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] je pro MediaWiki hlavní platformou a je podporováno nejlépe. MediaWiki pracuje také s [{{int:version-db-mysql-url}} MySQL] a [{{int:version-db-percona-url}} Percona Server], které jsou s MariaDB kompatibilní. ([https://www.php.net/manual/en/mysqli.installation.php Jak zkompilovat PHP s podporou MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] je populární otevřený databázový systém používaný jako alternativa k MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Jak přeložit PHP s podporou PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] je velmi dobře podporovaný odlehčený databázový systém. ([https://www.php.net/manual/en/pdo.installation.php Jak přeložit PHP s podporou SQLite], používá PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] je komerční podniková databáze. ([https://www.php.net/manual/en/oci8.installation.php Jak přeložit PHP s podporou OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] je komerční podniková databáze pro Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Jak přeložit PHP s podporou SQLSRV])", "config-header-mysql": "Nastavení MariaDB/MySQL", "config-header-postgres": "Nastavení PostgreSQL", "config-header-sqlite": "Nastavení SQLite", - "config-header-oracle": "Nastavení Oracle", - "config-header-mssql": "Nastavení Microsoft SQL Serveru", "config-invalid-db-type": "Chybný typ databáze", "config-missing-db-name": "Musíte zadat hodnotu pro „{{int:config-db-name}}“.", "config-missing-db-host": "Musíte zadat hodnotu pro „{{int:config-db-host}}“.", - "config-missing-db-server-oracle": "Musíte zadat hodnotu pro „{{int:config-db-host-oracle}}“.", - "config-invalid-db-server-oracle": "Chybné databázové TNS „$1“.\nPoužívejte buď „TNS Name“ nebo „Easy Connect“ (vizte [http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods]).", "config-invalid-db-name": "Chybné jméno databáze „$1“.\nPoužívejte pouze ASCII písmena (a-z, A-Z), čísla (0-9), podtržítko (_) a spojovník (-).", "config-invalid-db-prefix": "Chybný databázový prefix „$1“.\nPoužívejte pouze ASCII písmena (a-z, A-Z), čísla (0-9), podtržítko (_) a spojovník (-).", "config-connection-error": "$1.\n\nZkontrolujte server, uživatelské jméno a heslo a zkuste to znovu. Pokud jako adresu databázového serveru používáte „localhost“, zkuste použít „127.0.0.1“ (a naopak).", "config-invalid-schema": "Neplatné schéma pro MediaWiki „$1“.\nPoužívejte pouze ASCII písmena (a-z, A-Z), čísla (0-9) a podtržítko (_).", - "config-db-sys-create-oracle": "Instalátor podporuje zakládání nového účtu pouze prostřednictvím účtu SYSDBA.", - "config-db-sys-user-exists-oracle": "Uživatelský účet „$1“ již existuje. SYSDBA lze použít pouze pro založení nového účtu!", "config-postgres-old": "Je vyžadován PostgreSQL $1 nebo novější, vy máte $2.", - "config-mssql-old": "Je vyžadován Microsoft SQL Server $1 nebo novější. Vy máte $2.", "config-sqlite-name-help": "Zvolte jméno, které označuje vaši wiki.\nNepoužívejte mezery a spojovníky.\nPoužije se jako název souboru s daty SQLite.", "config-sqlite-parent-unwritable-group": "Nelze vytvořit datový adresář $1, protože do nadřazeného adresáře $2 nemá webový server právo zapisovat.\n\nInstalátor zjistil uživatele, pod kterým váš webový server běží.\nAbyste mohli pokračovat, umožněte mu zapisovat do adresáře $3.\nNa systémech Unix/Linux proveďte:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Nelze vytvořit datový adresář $1, protože do nadřazeného adresáře $2 nemá webový server právo zapisovat.\n\nInstalátoru se nepodařilo zjistit uživatele, pod kterým váš webový server běží.\nAbyste mohli pokračovat, umožněte zápis do $3 všem uživatelům.\nNa systémech Unix/Linux proveďte:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -176,11 +159,6 @@ "config-mysql-engine": "Typ úložiště:", "config-mysql-innodb": "InnoDB (doporučeno)", "config-mysql-engine-help": "'''InnoDB''' je téměř vždy nejlepší volba, neboť má dobrou podporu současného přístupu.\n\n'''MyISAM''' může být rychlejší u instalací pro jednoho uživatele nebo jen pro čtení.\nDatabáze MyISAM bývají poškozeny častěji než databáze InnoDB.", - "config-mssql-auth": "Typ autentizace:", - "config-mssql-install-auth": "Zvolte si typ autentizace, který se bude používat pro připojení k databázi v průběhu instalace.\nPokud zvolíte možnost „{{int:config-mssql-windowsauth}}“, použijí se přihlašovací údaje uživatele, pod kterým běží webový server.", - "config-mssql-web-auth": "Zvolte si typ autentizace, který se bude používat pro připojení k databázi za běžného provozu wiki.\nPokud zvolíte možnost „{{int:config-mssql-windowsauth}}“, použijí se přihlašovací údaje uživatele, pod kterým běží webový server.", - "config-mssql-sqlauth": "Autentizace SQL serveru", - "config-mssql-windowsauth": "Windows autentizace", "config-site-name": "Název wiki:", "config-site-name-help": "Bude se zobrazovat v titulku prohlížeče a na dalších místech.", "config-site-name-blank": "Zadejte název serveru.", diff --git a/includes/installer/i18n/da.json b/includes/installer/i18n/da.json index 8924964251..42d7bf097a 100644 --- a/includes/installer/i18n/da.json +++ b/includes/installer/i18n/da.json @@ -59,17 +59,14 @@ "config-mysql-old": "MySQL $1 eller nyere kræves. Du har $2.", "config-db-port": "Databaseport:", "config-type-mysql": "MariaDB, MySQL eller kompatibel", - "config-type-mssql": "Microsoft SQL-server", "config-header-mysql": "MariaDB/MySQL-indstillinger", "config-header-postgres": "PostgreSQL-indstillinger", "config-header-sqlite": "SQLite-indstillinger", - "config-header-oracle": "Oracle-indstillinger", "config-invalid-db-type": "Ugyldig databasetype", "config-sqlite-readonly": "Filen $1 er ikke skrivbar.", "config-sqlite-cant-create-db": "Kunne ikke oprette databasefilen $1.", "config-db-web-create": "Opret kontoen hvis den ikke allerede findes", "config-mysql-innodb": "InnoDB (anbefalet)", - "config-mssql-windowsauth": "Windows-godkendelse", "config-site-name": "Navn på wiki:", "config-site-name-blank": "Indtast et hjemmesidenavn.", "config-project-namespace": "Projektnavnerum:", diff --git a/includes/installer/i18n/de.json b/includes/installer/i18n/de.json index bdf1c6f639..649f841323 100644 --- a/includes/installer/i18n/de.json +++ b/includes/installer/i18n/de.json @@ -95,13 +95,9 @@ "config-db-type": "Datenbanksystem:", "config-db-host": "Datenbankserver:", "config-db-host-help": "Sofern sich die Datenbank auf einem anderen Server befindet, ist hier der Servername oder die entsprechende IP-Adresse anzugeben.\n\nSofern ein gemeinschaftlich genutzter Server verwendet wird, sollte der Hoster den zutreffenden Servernamen in seiner Dokumentation angegeben haben.\n\nSofern MySQL genutzt wird, funktioniert der Servername „localhost“ voraussichtlich nicht. Wenn nicht, sollte „127.0.0.1“ oder die lokale IP-Adresse angegeben werden.\n\nSofern PostgresQL genutzt wird, muss dieses Feld leer gelassen werden, um über ein Unix-Socket zu verbinden.", - "config-db-host-oracle": "Datenbank-TNS:", - "config-db-host-oracle-help": "Einen gültigen [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm „Local Connect“-Namen] angeben. Die „tnsnames.ora“-Datei muss von dieser Installation erkannt werden können.
Sofern die Client-Bibliotheken für Version 10g oder neuer verwendet werden, kann auch [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm „Easy Connect“] zur Namensgebung genutzt werden.", "config-db-wiki-settings": "Bitte Daten zur eindeutigen Identifikation dieses Wikis angeben", "config-db-name": "Name der Datenbank (ohne Bindestriche):", "config-db-name-help": "Bitte einen Namen angeben, mit dem das Wiki identifiziert werden kann.\nDabei sollten keine Leerzeichen verwendet werden.\n\nSofern ein gemeinschaftlich genutzter Server verwendet wird, sollte der Hoster den Datenbanknamen angegeben oder aber die Erstellung einer Datenbank über ein entsprechendes Interface gestattet haben.", - "config-db-name-oracle": "Datenbankschema:", - "config-db-account-oracle-warn": "Es gibt drei von MediaWiki unterstützte Möglichkeiten, Oracle als Datenbank einzurichten:\n\nSofern das Datenbankbenutzerkonto während des Installationsvorgangs erstellt werden soll, muss ein Datenbankbenutzerkonto mit der SYSDBA-Berechtigung zusammen mit den entsprechenden Anmeldeinformationen angegeben werden, mit dem dann über das Web auf die Datenbank zugegriffen werden kann. Alternativ kann man auch lediglich ein einzelnes manuell angelegtes Datenbankbenutzerkonto angeben, mit dem über das Web auf die Datenbank zugegriffen werden kann, sofern dieses über die Berechtigung zur Erstellung von Datenbankschemen verfügt. Zudem ist es möglich, zwei Datenbankbenutzerkonten anzugeben, von denen eines die Berechtigung zur Erstellung von Datenbankschemen hat und das andere, um mit ihm über das Web auf die Datenbank zuzugreifen.\n\nEin Skript zum Anlegen eines Datenbankbenutzerkontos mit den notwendigen Berechtigungen findet man unter dem Pfad „…/maintenance/oracle/“ dieser MediaWiki-Installation. Es ist dabei zu bedenken, dass die Verwendung eines Datenbankbenutzerkontos mit beschränkten Berechtigungen die Nutzung der Wartungsfunktionen für das Standarddatenbankbenutzerkonto deaktiviert.", "config-db-install-account": "Benutzerkonto für die Installation", "config-db-username": "Name des Datenbankbenutzers:", "config-db-password": "Passwort des Datenbankbenutzers:", @@ -120,37 +116,24 @@ "config-pg-test-error": "Es kann keine Verbindung zur Datenbank '''$1''' hergestellt werden: $2", "config-sqlite-dir": "SQLite-Datenverzeichnis:", "config-sqlite-dir-help": "SQLite speichert alle Daten in einer einzigen Datei.\n\nDas für sie vorgesehene Verzeichnis muss während des Installationsvorgangs beschreibbar sein.\n\nEs sollte '''nicht''' über das Web zugänglich sein, was der Grund ist, warum die Datei nicht dort abgelegt wird, wo sich die PHP-Dateien befinden.\n\nDas Installationsprogramm wird mit der Datei zusammen eine zusätzliche .htaccess-Datei erstellen. Sofern dies scheitert, können Dritte auf die Datendatei zugreifen.\nDies umfasst die Nutzerdaten (E-Mail-Adressen, Passwörter, etc.) wie auch gelöschte Seitenversionen und andere vertrauliche Daten, die im Wiki gespeichert sind.\n\nEs ist daher zu erwägen, die Datendatei an gänzlich anderer Stelle abzulegen, beispielsweise im Verzeichnis ./var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Standardtabellenraum:", - "config-oracle-temp-ts": "Temporärer Tabellenraum:", "config-type-mysql": "MariaDB, MySQL (oder kompatible Datenbanksysteme)", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki unterstützt die folgenden Datenbanksysteme:\n\n$1\n\nSofern unterhalb nicht das Datenbanksystem angezeigt wird, das verwendet werden soll, muss dieses noch verfügbar gemacht werden. Oben ist zu jedem unterstützten Datenbanksystem ein Link zur entsprechenden Anleitung vorhanden.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] ist das von MediaWiki primär unterstützte Datenbanksystem. MediaWiki funktioniert auch mit [{{int:version-db-mysql-url}} MySQL] und [{{int:version-db-percona-url}} Percona Server], die MariaDB-kompatibel sind. ([https://www.php.net/manual/en/mysqli.installation.php Anleitung zur Kompilierung von PHP mit MySQL-Unterstützung])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] ist ein beliebtes Open-Source-Datenbanksystem und eine Alternative zu MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Anleitung zur Kompilierung von PHP mit PostgreSQL-Unterstützung])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] ist ein verschlanktes Datenbanksystem, das auch gut unterstützt wird ([https://www.php.net/manual/de/pdo.installation.php Anleitung zur Kompilierung von PHP mit SQLite-Unterstützung], verwendet PHP Data Objects (PDO))", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] ist eine kommerzielle Unternehmensdatenbank ([https://www.php.net/manual/en/oci8.installation.php Anleitung zur Kompilierung von PHP mit OCI8-Unterstützung])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] ist eine gewerbliche Unternehmensdatenbank für Windows. ([https://www.php.net/manual/de/sqlsrv.installation.php Anleitung zur Kompilierung von PHP mit SQLSRV-Unterstützung])", "config-header-mysql": "MariaDB/MySQL-Einstellungen", "config-header-postgres": "PostgreSQL-Einstellungen", "config-header-sqlite": "SQLite-Einstellungen", - "config-header-oracle": "Oracle-Einstellungen", - "config-header-mssql": "Einstellungen von Microsoft SQL Server", "config-invalid-db-type": "Unzulässiges Datenbanksystem", "config-missing-db-name": "Bei „{{int:config-db-name}}“ muss ein Wert angegeben werden.", "config-missing-db-host": "Bei „{{int:config-db-host}}“ muss ein Wert angegeben werden.", - "config-missing-db-server-oracle": "Für „{{int:config-db-host-oracle}}“ muss ein Wert eingegeben werden.", - "config-invalid-db-server-oracle": "Ungültiges Datenbank-TNS „$1“.\nEntweder „TNS Name“ oder eine „Easy Connect“-Zeichenfolge verwenden ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle-Benennungsmethoden])", "config-invalid-db-name": "Ungültiger Datenbankname „$1“.\nEs dürfen nur ASCII-codierte Buchstaben (a-z, A-Z), Zahlen (0-9), Unter- (_) sowie Bindestriche (-) verwendet werden.", "config-invalid-db-prefix": "Ungültiger Datenbanktabellenpräfix „$1“.\nEs dürfen nur ASCII-codierte Buchstaben (a-z, A-Z), Zahlen (0-9), Unter- (_) sowie Bindestriche (-) verwendet werden.", "config-connection-error": "$1.\n\nBitte unten angegebenen Servernamen, Benutzernamen sowie das Passwort überprüfen und es danach erneut versuchen. Falls „localhost“ als Datenbankhost verwendet wird, versuche stattdessen „127.0.0.1“ (oder umgekehrt).", "config-invalid-schema": "Ungültiges Datenschema für MediaWiki „$1“.\nEs dürfen nur ASCII-codierte Buchstaben (a-z, A-Z), Zahlen (0-9) und Unterstriche (_) verwendet werden.", - "config-db-sys-create-oracle": "Das Installationsprogramm unterstützt nur die Verwendung eines Datenbankbenutzerkontos mit SYSDBA-Berechtigung zum Anlegen eines neuen Datenbankbenutzerkontos.", - "config-db-sys-user-exists-oracle": "Das Datenbankbenutzerkonto „$1“ ist bereits vorhanden. Ein Datenbankbenutzerkontos mit SYSDBA-Berechtigung kann nur zum Anlegen eines neuen Datenbankbenutzerkontos genutzt werden.", "config-postgres-old": "PostgreSQL $1 oder höher wird benötigt. PostgreSQL $2 ist momentan vorhanden.", - "config-mssql-old": "Es wird Microsoft SQL Server $1 oder später benötigt. Deine Version ist $2.", "config-sqlite-name-help": "Bitten einen Namen angeben, mit dem das Wiki identifiziert werden kann.\nDabei bitte keine Leerzeichen oder Bindestriche verwenden.\nDieser Name wird für die SQLite-Datendateinamen genutzt.", "config-sqlite-parent-unwritable-group": "Das Datenverzeichnis $1 kann nicht erzeugt werden, da das übergeordnete Verzeichnis $2 nicht für den Webserver beschreibbar ist.\n\nDas Installationsprogramm konnte den Benutzer bestimmen, mit dem Webserver ausgeführt wird.\nSchreibzugriff auf das $3-Verzeichnis muss für diesen ermöglicht werden, um den Installationsvorgang fortsetzen zu können.\n\nAuf einem Unix- oder Linux-System:\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Das Datenverzeichnis $1 kann nicht erzeugt werden, da das übergeordnete Verzeichnis $2 nicht für den Webserver beschreibbar ist.\n\nDas Installationsprogramm konnte den Benutzer bestimmen, mit dem Webserver ausgeführt wird.\nSchreibzugriff auf das $3-Verzeichnis muss global für diesen und andere Benutzer ermöglicht werden, um den Installationsvorgang fortsetzen zu können.\n\nAuf einem Unix- oder Linux-System:\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -175,11 +158,6 @@ "config-mysql-engine": "Datenbanksystem:", "config-mysql-innodb": "InnoDB (empfohlen)", "config-mysql-engine-help": "InnoDB als Speichersubsystem für das Datenbanksystem MySQL ist fast immer die bessere Wahl, da es gleichzeitige Zugriffe gut unterstützt.\n\nMyISAM als Speichersubsystem für das Datenbanksystem MySQL ist hingegen in Einzelnutzerumgebungen oder bei schreibgeschützten Wikis schneller.\nDatenbanken, die MyISAM verwenden, sind indes tendenziell fehleranfälliger als solche, die InnoDB verwenden.", - "config-mssql-auth": "Authentifikationstyp:", - "config-mssql-install-auth": "Wähle den Authentifikationstyp aus, der zur Verbindung mit der Datenbank während des Installationsprozesses verwendet wird.\nFalls du „{{int:config-mssql-windowsauth}}“ auswählst, werden die Anmeldeinformationen eines beliebigen Benutzers verwendet, der den Webserver ausführt.", - "config-mssql-web-auth": "Wähle den Authentifikationstyp aus, der vom Webserver zur Verbindung mit dem Datenbankserver während des gewöhnlichen Betriebs des Wikis verwendet wird.\nFalls du „{{int:config-mssql-windowsauth}}“ auswählst, werden die Anmeldeinformationen eines beliebigen Benutzers verwendet, der den Webserver ausführt.", - "config-mssql-sqlauth": "SQL-Server-Authentifikation", - "config-mssql-windowsauth": "Windows-Authentifikation", "config-site-name": "Name des Wikis:", "config-site-name-help": "Er wird in der Titelleiste des Browsers, wie auch verschiedenen anderen Stellen, genutzt.", "config-site-name-blank": "Den Namen des Wikis angeben.", diff --git a/includes/installer/i18n/diq.json b/includes/installer/i18n/diq.json index d5967849ae..721a8dc593 100644 --- a/includes/installer/i18n/diq.json +++ b/includes/installer/i18n/diq.json @@ -38,28 +38,18 @@ "config-env-hhvm": "HHVM $1 saz bi ya.", "config-db-type": "Database tipe:", "config-db-host": "Database host:", - "config-db-host-oracle": "Database TNS:", "config-db-wiki-settings": "Ena wikiyer akernë", "config-db-name": "Database name:", - "config-db-name-oracle": "Şemaya hardata:", "config-db-username": "Database nameykarberi:", "config-db-password": "Database parola :", "config-db-port": "Portê database:", - "config-oracle-def-ts": "Hesıbyaye caytabloy:", - "config-oracle-temp-ts": "İdareten caytabloy:", "config-type-mysql": "MySQL (yana hewlın)", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "Eyarê MySQL", "config-header-sqlite": "SQLite sazi", - "config-header-oracle": "Orqcle sazi", - "config-header-mssql": "Sazë Microsoft SQL Serveri", "config-missing-db-name": "\"{{int:config-db-name}}\"nrë jew erc dekerdış gerek keno.", "config-missing-db-host": "\"{{int:config-db-host}}\" rë jew erc gerek keno", - "config-missing-db-server-oracle": "\"{{int:config-db-host-oracle}}\" rë jew erc gerek keno", "config-mysql-engine": "Motorë depok kerdışi", "config-mysql-innodb": "InnoDB", - "config-mssql-sqlauth": "SQL Server araştnayış", - "config-mssql-windowsauth": "Windows kamiye araştnayış", "config-site-name": "Namey wiki:", "config-site-name-blank": "Yew nameyê sita cıkewe.", "config-project-namespace": "Wareyê nameyê proceyi:", diff --git a/includes/installer/i18n/el.json b/includes/installer/i18n/el.json index 97b4fd35a8..d0a386f014 100644 --- a/includes/installer/i18n/el.json +++ b/includes/installer/i18n/el.json @@ -85,11 +85,9 @@ "config-db-type": "Τύπος βάσης δεδομένων:", "config-db-host": "Φιλοξενία βάσης δεδομένων:", "config-db-host-help": "Εάν ο διακομιστής βάσης δεδομένων σας βρίσκεται σε διαφορετικό διακομιστή, εισαγάγετε εδώ το όνομα του κεντρικού υπολογιστή ή τη διεύθυνση IP.\n\nΕάν χρησιμοποιείτε μοιραζόμενη φιλοξενία του ιστοτόπου σας, ο πάροχος φιλοξενίας σας θα πρέπει να σας δίνει το σωστό όνομα κεντρικού υπολογιστή στην τεκμηρίωση του.\n\nΕάν εγκαθιστάτε σε διακομιστή Windows και χρησιμοποιείτε MySQL, το «localhost» μπορεί να μην λειτουργεί ως όνομα διακομιστή. Εάν δεν λειτουργεί, δοκιμάστε «127.0.0.1» ως τοπική διεύθυνση IP.\n\nΕάν χρησιμοποιείτε PostgreSQL, αφήστε αυτό το πεδίο κενό για να συνδεθείτε μέσω υποδοχής Unix.", - "config-db-host-oracle": "Βάση δεδομένων TNS:", "config-db-wiki-settings": "Αναγνώριση αυτού του wiki", "config-db-name": "Όνομα βάσης δεδομένων (χωρίς υφέν):", "config-db-name-help": "Επιλέξτε όνομα που να χαρακτηρίζει το wiki σας. Δεν πρέπει να περιέχει κενά διαστήματα.\n\nΕάν χρησιμοποιείτε μοιραζόμενη φιλοξενία του ιστοτόπου σας, ο πάροχος φιλοξενίας σας είτε θα σας δίνει να χρησιμοποιήσετε ένα συγκεκριμένο όνομα βάσης δεδομένων ή θα σας δίνει τη δυνατότητα να δημιουργείτε βάσεις δεδομένων μέσω κάποιου πίνακα ελέγχου.", - "config-db-name-oracle": "Σχήμα βάσης δεδομένων:", "config-db-install-account": "Λογαριασμός χρήστη για την εγκατάσταση", "config-db-username": "Όνομα χρήστη βάσης δεδομένων:", "config-db-password": "Συνθηματικό βάσης δεδομένων:", @@ -107,31 +105,21 @@ "config-db-schema-help": "Αυτό το σχήμα συνήθως αρκεί.\nΑλλάξτε το μόνο αν είστε βέβαιοι ότι χρειάζεται.", "config-pg-test-error": "Δεν μπορεί να συνδεθεί στη βάση δεδομένων $1: $2", "config-sqlite-dir": "SQLite κατάλογος δεδομένων:", - "config-oracle-temp-ts": "Προσωρινό tablespace:", "config-type-mysql": "MySQL (ή συμβατό)", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "To MediaWiki υποστηρίζει τα ακόλουθα συστήματα βάσεων δεδομένων:\n\n$1\n\nΑν δεν εμφανίζεται παρακάτω το σύστημα βάσης δεδομένων που θέλετε να χρησιμοποιήσετε, τότε ακολουθήστε τις οδηγίες στον παραπάνω σύνδεσμο για να ενεργοποιήσετε την υποστήριξη.", "config-dbsupport-mysql": "* Η [{{int:version-db-mysql-url}} MySQL] είναι ο πρωταρχικός στόχος για το MediaWiki και υποστηρίζεται καλύτερα. Το MediaWiki συνεργάζεται επίσης με τη [{{int:version-db-mariadb-url}} MariaDB] και το [{{int:version-db-percona-url}} διακομιστή Percona], που είναι όλα συμβατά με MySQL. ([https://www.php.net/manual/en/mysqli.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη MySQL])", "config-dbsupport-postgres": "* Η [{{int:version-db-postgres-url}} PostgreSQL] είναι δημοφιλές σύστημα βάσης δεδομένων ανοικτού κώδικα ως εναλλακτική της MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη PostgreSQL])", "config-dbsupport-sqlite": "* Η [{{int:version-db-sqlite-url}} SQLite] είναι ένα ελαφρύ σύστημα βάσης δεδομένων που υποστηρίζεται πολύ καλά. ([http://www.php.net/manual/en/pdo.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη SQLite], χρησιμοποιεί PDO)", - "config-dbsupport-oracle": "* Η [{{int:version-db-oracle-url}} Oracle] είναι εμπορική βάση δεδομένων για επιχειρήσεις. ([http://www.php.net/manual/en/oci8.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη OCI8])", - "config-dbsupport-mssql": "* Ο [{{int:version-db-mssql-url}} Microsoft SQL Server] είναι εμπορική βάση δεδομένων για επιχειρήσεις που λειτουργεί σε Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Πώς να μεταγλωττίσετε την PHP με υποστήριξη SQLSRV])", "config-header-mysql": "Ρυθμίσεις MySQL", "config-header-postgres": "Ρυθμίσεις PostgreSQL", "config-header-sqlite": "Ρυθμίσεις SQLite", - "config-header-oracle": "Ρυθμίσεις Oracle", - "config-header-mssql": "Ρυθμίσεις του Microsoft SQL Server", "config-invalid-db-type": "Μη έγκυρος τύπος βάσης δεδομένων", "config-missing-db-name": "Πρέπει να εισαγάγετε μια τιμή για \"{{int:config-db-name}}\".", "config-missing-db-host": "Πρέπει να εισαγάγετε μια τιμή για \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Πρέπει να εισαγάγετε μια τιμή για \"{{int:config-db-host-oracle}}\".", "config-connection-error": "$1.\n\nΕλέγξτε τη διεύθυνση της βάσης δεδομένων, το όνομα χρήστη και το συνθηματικό και προσπαθήστε ξανά.", - "config-db-sys-user-exists-oracle": "Ο λογαριασμός χρήστη \"$1\" υπάρχει ήδη. Το SYSDBA μπορεί να χρησιμοποιηθεί μόνο για τη δημιουργία ενός νέου λογαριασμού!", "config-postgres-old": "Απαιτείται PostgreSQL $1 ή νεότερο. Εσείς έχετε $2.", - "config-mssql-old": "Απαιτείται Microsoft SQL Server $1 ή νεότερο. Εσείς έχετε $2.", "config-sqlite-readonly": "Το αρχείο $1 δεν είναι εγγράψιμο.", "config-sqlite-cant-create-db": "Δεν ήταν δυνατή η δημιουργία του αρχείου βάσης δεδομένων $1.", "config-upgrade-error": "Υπήρξε σφάλμα κατά την αναβάθμιση της λίστας MediaWiki στην βάση δεδομένων σας.\n\nΓια περισσότερες πληροφορίες δέστε την σύνδεση σας πιο πάνω και ξανακάνετε κλικ στο Continue.", @@ -143,9 +131,6 @@ "config-mysql-engine": "Μηχανή αποθήκευσης:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "Το InnoDB είναι σχεδόν πάντα η καλύτερη επιλογή, αφού έχει καλή υποστήριξη ταυτόχρονης λειτουργίας.\n\nΤο MyISAM μπορεί να είναι ταχύτερο σε εγκαταστάσεις του ενός χρήστη ή μόνο ανάγνωσης. \nΟι βάσεις δεδομένων MyISAM τείνουν να φθείρονται συχνότερα από τις βάσεις δεδομένων InnoDB.", - "config-mssql-auth": "Τύπος ελέγχου ταυτότητας:", - "config-mssql-sqlauth": "Έλεγχος ταυτότητας του SQL Server", - "config-mssql-windowsauth": "Έλεγχος ταυτότητας των Windows", "config-site-name": "Όνομα του wiki:", "config-site-name-help": "Αυτό θα εμφανίζεται στη γραμμή τίτλου του προγράμματος περιήγησης και σε διάφορα άλλα μέρη.", "config-site-name-blank": "Εισαγάγετε όνομα ιστοχώρου.", diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json index a9da56dc43..758221f2bb 100644 --- a/includes/installer/i18n/en.json +++ b/includes/installer/i18n/en.json @@ -83,13 +83,9 @@ "config-db-type": "Database type:", "config-db-host": "Database host:", "config-db-host-help": "If your database server is on a different server, enter the host name or IP address here.\n\nIf you are using shared web hosting, your hosting provider should give you the correct host name in their documentation.\n\nIf you are using MySQL, using \"localhost\" may not work for the server name. If it does not, try \"127.0.0.1\" for the local IP address.\n\nIf you are using PostgreSQL, leave this field blank to connect via a Unix socket.", - "config-db-host-oracle": "Database TNS:", - "config-db-host-oracle-help": "Enter a valid [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; a tnsnames.ora file must be visible to this installation.
If you are using client libraries 10g or newer you can also use the [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect] naming method.", "config-db-wiki-settings": "Identify this wiki", "config-db-name": "Database name (no hyphens):", "config-db-name-help": "Choose a name that identifies your wiki.\nIt should not contain spaces.\n\nIf you are using shared web hosting, your hosting provider will either give you a specific database name to use or let you create databases via a control panel.", - "config-db-name-oracle": "Database schema:", - "config-db-account-oracle-warn": "There are three supported scenarios for installing Oracle as database backend:\n\nIf you wish to create database account as part of the installation process, please supply an account with SYSDBA role as database account for installation and specify the desired credentials for the web-access account, otherwise you can either create the web-access account manually and supply only that account (if it has required permissions to create the schema objects) or supply two different accounts, one with create privileges and a restricted one for web access.\n\nScript for creating an account with required privileges can be found in \"maintenance/oracle/\" directory of this installation. Keep in mind that using a restricted account will disable all maintenance capabilities with the default account.", "config-db-install-account": "User account for installation", "config-db-username": "Database username:", "config-db-password": "Database password:", @@ -108,37 +104,24 @@ "config-pg-test-error": "Cannot connect to database $1: $2", "config-sqlite-dir": "SQLite data directory:", "config-sqlite-dir-help": "SQLite stores all data in a single file.\n\nThe directory you provide must be writable by the webserver during installation.\n\nIt should not be accessible via the web; this is why we're not putting it where your PHP files are.\n\nThe installer will write a .htaccess file along with it, but if that fails someone can gain access to your raw database.\nThat includes raw user data (email addresses, hashed passwords) as well as deleted revisions and other restricted data on the wiki.\n\nConsider putting the database somewhere else altogether, for example in /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Default tablespace:", - "config-oracle-temp-ts": "Temporary tablespace:", "config-type-mysql": "MariaDB, MySQL, or compatible", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki supports the following database systems:\n\n$1\n\nIf you do not see the database system you are trying to use listed below, then follow the instructions linked above to enable support.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] is the primary target for MediaWiki and is best supported. MediaWiki also works with [{{int:version-db-mysql-url}} MySQL] and [{{int:version-db-percona-url}} Percona Server], which are MariaDB compatible. ([https://www.php.net/manual/en/mysqli.installation.php How to compile PHP with MySQL support])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] is a popular open source database system as an alternative to MySQL. ([https://www.php.net/manual/en/pgsql.installation.php How to compile PHP with PostgreSQL support])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] is a lightweight database system that is very well supported. ([https://www.php.net/manual/en/pdo.installation.php How to compile PHP with SQLite support], uses PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] is a commercial enterprise database. ([https://www.php.net/manual/en/oci8.installation.php How to compile PHP with OCI8 support])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] is a commercial enterprise database for Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php How to compile PHP with SQLSRV support])", "config-header-mysql": "MariaDB/MySQL settings", "config-header-postgres": "PostgreSQL settings", "config-header-sqlite": "SQLite settings", - "config-header-oracle": "Oracle settings", - "config-header-mssql": "Microsoft SQL Server settings", "config-invalid-db-type": "Invalid database type.", "config-missing-db-name": "You must enter a value for \"{{int:config-db-name}}\".", "config-missing-db-host": "You must enter a value for \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "You must enter a value for \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "Invalid database TNS \"$1\".\nUse either \"TNS Name\" or an \"Easy Connect\" string ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods]).", "config-invalid-db-name": "Invalid database name \"$1\".\nUse only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-).", "config-invalid-db-prefix": "Invalid database prefix \"$1\".\nUse only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-).", "config-connection-error": "$1.\n\nCheck the host, username and password and try again. If using \"localhost\" as the database host, try using \"127.0.0.1\" instead (or vice versa).", "config-invalid-schema": "Invalid schema for MediaWiki \"$1\".\nUse only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).", - "config-db-sys-create-oracle": "Installer only supports using a SYSDBA account for creating a new account.", - "config-db-sys-user-exists-oracle": "User account \"$1\" already exists. SYSDBA can only be used for creating of a new account!", "config-postgres-old": "PostgreSQL $1 or later is required. You have $2.", - "config-mssql-old": "Microsoft SQL Server $1 or later is required. You have $2.", "config-sqlite-name-help": "Choose a name that identifies your wiki.\nDo not use spaces or hyphens.\nThis will be used for the SQLite data filename.", "config-sqlite-parent-unwritable-group": "Cannot create the data directory $1, because the parent directory $2 is not writable by the webserver.\n\nThe installer has determined the user your webserver is running as.\nMake the $3 directory writable by it to continue.\nOn a Unix/Linux system do:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Cannot create the data directory $1, because the parent directory $2 is not writable by the webserver.\n\nThe installer could not determine the user your webserver is running as.\nMake the $3 directory globally writable by it (and others!) to continue.\nOn a Unix/Linux system do:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -163,11 +146,6 @@ "config-mysql-engine": "Storage engine:", "config-mysql-innodb": "InnoDB (recommended)", "config-mysql-engine-help": "InnoDB is almost always the best option, since it has good concurrency support.\n\nMyISAM may be faster in single-user or read-only installations.\nMyISAM databases tend to get corrupted more often than InnoDB databases.", - "config-mssql-auth": "Authentication type:", - "config-mssql-install-auth": "Select the authentication type that will be used to connect to the database during the installation process.\nIf you select \"{{int:config-mssql-windowsauth}}\", the credentials of whatever user the webserver is running as will be used.", - "config-mssql-web-auth": "Select the authentication type that the web server will use to connect to the database server, during ordinary operation of the wiki.\nIf you select \"{{int:config-mssql-windowsauth}}\", the credentials of whatever user the webserver is running as will be used.", - "config-mssql-sqlauth": "SQL Server Authentication", - "config-mssql-windowsauth": "Windows Authentication", "config-site-name": "Name of wiki:", "config-site-name-help": "This will appear in the title bar of the browser and in various other places.", "config-site-name-blank": "Enter a site name.", diff --git a/includes/installer/i18n/eo.json b/includes/installer/i18n/eo.json index 3f83612474..d0759889a8 100644 --- a/includes/installer/i18n/eo.json +++ b/includes/installer/i18n/eo.json @@ -54,30 +54,21 @@ "config-db-host": "Datenbanka gastigilo:", "config-db-wiki-settings": "Identigu ĉi tiun vikion", "config-db-name": "Nomo de datumbazo:", - "config-db-name-oracle": "Datenbanka skemo:", "config-db-username": "Datenbanka uzantnomo:", "config-db-password": "Datenbanka pasvorto:", "config-db-port": "Datenbanka pordo:", "config-db-schema": "Skemo por MediaVikio (sen streketo):", "config-sqlite-dir": "Datena dosierujo por SQLite:", - "config-oracle-def-ts": "Implicita tabelspaco:", - "config-oracle-temp-ts": "Portempa tabelspaco:", "config-type-mysql": "MariaDB, MySQL, aŭ kongrua", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "MairaDB/MySQL-agordoj", "config-header-postgres": "PostgreSQL-agordoj", "config-header-sqlite": "SQLite-agordoj", - "config-header-oracle": "Oracle-agordoj", - "config-header-mssql": "Microsoft SQL Server-agordoj", "config-invalid-db-type": "Nevalida speco de datenbanko.", "config-sqlite-readonly": "La dosiero $1 ne estas surskribebla.", "config-sqlite-cant-create-db": "Ne povis krei datenbankan dosieron $1.", "config-regenerate": "Refari dosieron LocalSettings.php →", "config-mysql-engine": "Konservada modulo:", "config-mysql-innodb": "InnoDB (rekomendata)", - "config-mssql-auth": "Speco de aŭtentokontrolo:", - "config-mssql-sqlauth": "Aŭtentokontrolo de Microsoft SQL-Servilo", - "config-mssql-windowsauth": "Aŭtentokontrolo de Windows", "config-site-name": "Nomo de vikio:", "config-site-name-blank": "Enigu nomon de retejo.", "config-project-namespace": "Projekta nomspaco:", diff --git a/includes/installer/i18n/es.json b/includes/installer/i18n/es.json index 5e3d3a1034..d349ff6797 100644 --- a/includes/installer/i18n/es.json +++ b/includes/installer/i18n/es.json @@ -124,13 +124,9 @@ "config-db-type": "Tipo de base de datos:", "config-db-host": "Servidor de la base de datos:", "config-db-host-help": "Si tu servidor de base de datos está en otro servidor, escribe el nombre del equipo o su dirección IP aquí.\n\nSi estás utilizando alojamiento web compartido, tu proveedor debería darte el nombre correcto del servidor en su documentación.\n\nSi vas a instalar en un servidor Windows y a utilizar MySQL, el uso de \"localhost\" como nombre del servidor puede no funcionar. Si es así, intenta poner \"127.0.0.1\" como dirección IP local.\n\nSi utilizas PostgreSQL, deja este campo vacío para conectarse a través de un socket de Unix.", - "config-db-host-oracle": "TNS de la base de datos:", - "config-db-host-oracle-help": "Escribe un [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm nombre de conexión local] válido; un archivo tnsnames.ora debe ser visible para esta instalación.
Si estás utilizando bibliotecas de cliente 10g o más recientes también puedes utilizar el método de asignación de nombres [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifica este wiki", "config-db-name": "Nombre de base de datos (ningún guion):", "config-db-name-help": "Elige un nombre que identifique tu wiki.\nNo debe contener espacios.\n\nSi estás utilizando alojamiento web compartido, tu proveedor te dará un nombre específico de base de datos para que lo utilices, o bien te permitirá crear bases de datos a través de un panel de control.", - "config-db-name-oracle": "Esquema de la base de datos:", - "config-db-account-oracle-warn": "Hay tres escenarios compatibles para la instalación de Oracle como base de datos back-end:\n\nSi desea crear una cuenta de base de datos como parte del proceso de instalación, por favor suministre una cuenta con función SYSDBA como cuenta de base de datos para la instalación y especifique las credenciales deseadas de la cuenta de acceso al web, de lo contrario puede crear manualmente la cuenta de acceso al web y suministrar sólo esa cuenta (si tiene los permisos necesarios para crear los objetos de esquema) o suministrar dos cuentas diferentes, una con privilegios de creación y otra con acceso restringido a la web\n\nLa secuencia de comandos (script) para crear una cuenta con los privilegios necesarios puede encontrarse en el directorio \"maintenance/oracle/\" de esta instalación. Tenga en cuenta que utilizando una cuenta restringida desactivará todas las capacidades de mantenimiento con la cuenta predeterminada.", "config-db-install-account": "Cuenta de usuario para instalación", "config-db-username": "Nombre de usuario de la base de datos:", "config-db-password": "Contraseña de la base de datos:", @@ -149,37 +145,24 @@ "config-pg-test-error": "No se puede conectar con la base de datos $1: $2", "config-sqlite-dir": "Directorio de datos SQLite:", "config-sqlite-dir-help": "SQLite almacena todos los datos en un único archivo.\n\nEl directorio que proporciones debe poder escribirse por el servidor web durante la instalación.\n\n'''No''' debería ser accesible a través de Internet. Por eso no vamos a ponerlo en el sitio donde están los archivos PHP.\n\nEl instalador escribirá un archivo .htaccess junto con él, pero si falla alguien podría tener acceso a la base de datos en bloque.\nEso incluye los datos de usuario en bloque (direcciones de correo electrónico, las contraseñas con hash) así como revisiones eliminadas y otros datos restringidos del wiki.\n\nConsidera poner la base de datos en algún otro sitio, por ejemplo en /var/lib/mediawiki/tuwiki .", - "config-oracle-def-ts": "Espacio de tablas predeterminado:", - "config-oracle-temp-ts": "Espacio de tablas temporal:", "config-type-mysql": "MariaDB, MySQL o un sistema compatible", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki es compatible con los siguientes sistemas de bases de datos:\n\n$1\n\nSi no encuentras en el listado el sistema de base de datos que estás intentando utilizar, sigue las instrucciones enlazadas arriba para activar la compatibilidad.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] es la base de datos mayoritaria para MediaWiki y la que goza de mayor compatibilidad. MediaWiki también funciona con [{{int:version-db-myslql-url}} MySQL] y [{{int:version-db-percona-url}} Percona Server], que son compatibles con MariaDB. ([https://www.php.net/manual/es/mysql.installation.php Cómo compilar PHP con compatibilidad MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] es un sistema de base de datos popular de código abierto, alternativa a MySQL. ([https://www.php.net/manual/es/pgsql.installation.php Cómo compilar PHP con compatibilidad PostgreSQL]).", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] es un sistema de base de datos ligero con gran compatibilidad con MediaWiki. ([https://www.php.net/manual/en/pdo.installation.php Cómo compilar PHP con compatibilidad SQLite], usando PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] es una base de datos comercial a nivel empresarial. ([https://www.php.net/manual/en/oci8.installation.php Cómo compilar PHP con compatibilidad con OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] es un sistema comercial de base de datos empresariales para Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Cómo compilar PHP con compatibilidad con SQLSRV])", "config-header-mysql": "Configuración de MariaDB/MySQL", "config-header-postgres": "Configuración de PostgreSQL", "config-header-sqlite": "Configuración de SQLite", - "config-header-oracle": "Configuración de Oracle", - "config-header-mssql": "Configuración de Microsoft SQL Server", "config-invalid-db-type": "El tipo de base de datos no es válido", "config-missing-db-name": "Debes escribir un valor para \"{{int:config-db-nombre}}\".", "config-missing-db-host": "Debes escribir un valor para \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Debes escribir un valor para \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "El TNS de la base de datos «$1» es inválido.\nDebes usar un \"TNS Name\" o una cadena \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Nomenclatura de Oracle]).", "config-invalid-db-name": "El nombre de la base de datos \"$1\" no es válido.\nUsa sólo caracteres ASCII: letras (a-z, A-Z), números (0-9), guiones bajos (_) y guiones (-).", "config-invalid-db-prefix": "El prefijo de la base de datos \"$1\" no es válido.\nUsa sólo caracteres ASCII: letras (a-z, A-Z), números (0-9), guiones bajos (_) y guiones (-).", "config-connection-error": "$1.\n\nControl el anfitrión, username y contraseña y probar otra vez. Si utilizando \"localhost\" como el anfitrión de base de datos, prueba utilizar \"127.0.0.1\" en cambio (o viceversa).", "config-invalid-schema": "El esquema de la base de datos \"$1\" es inválido.\nUse sólo carateres ASCII: letras (a-z, A-Z), guarismos (0-9) y guiones bajos (_).", - "config-db-sys-create-oracle": "El instalador sólo admite el empleo de cuentas SYSDBA como método para crear una cuenta nueva.", - "config-db-sys-user-exists-oracle": "La cuenta de usuario «$1» ya existe. SYSDBA solo puede utilizarse para crear cuentas nuevas.", "config-postgres-old": "Se requiere PostgreSQL $1 o posterior. Tienes la versión $2.", - "config-mssql-old": "Se requiere Microsoft SQL Server $1 o posterior. Tienes la versión $2.", "config-sqlite-name-help": "Elige el nombre que identificará a tu wiki.\nNo uses espacios o guiones.\nEste nombre se usará como nombre del archivo de datos de SQLite.", "config-sqlite-parent-unwritable-group": "No se puede crear el directorio de datos $1, porque el servidor web no tiene permiso de escribir en el directorio padre $2.\n\nEl instalador ha determinado el usuario con el que se ejecuta tu servidor web.\nConcede permisos de escritura a él en el directorio $3 para continuar.\nEn un sistema Unix/Linux haz:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "No se puede crear el directorio de datos $1, porque el servidor web no tiene permiso de escribir en el directorio padre $2.\n\nEl instalador no pudo determinar el usuario con el que se ejecuta tu servidor web.\nConcede permisos de escritura a él (¡y a otros!) en el directorio $3 para continuar.\nEn un sistema Unix/Linux haz:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -203,11 +186,6 @@ "config-mysql-engine": "Motor de almacenamiento:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "InnoDB es casi siempre la mejor opción, dado que soporta bien los accesos simultáneos.\n\nMyISAM puede ser más rápido en instalaciones con usuario único o de sólo lectura.\nLas bases de datos MyISAM tienden a corromperse más a menudo que las bases de datos InnoDB.", - "config-mssql-auth": "Tipo de autenticación:", - "config-mssql-install-auth": "Selecciona el tipo de autenticación que se utilizará para conectarse a la base de datos durante el proceso de instalación.\nSi seleccionas \"{{int:config-mssql-windowsauth}}\", se usarán las credenciales del usuario con el que se ejecuta el servidor web.", - "config-mssql-web-auth": "Selecciona el tipo de autenticación que utilizará el servidor web para conectarse al servidor de base de datos, durante el funcionamiento normal de la wiki.\nSi seleccionas \"{{int:config-mssql-windowsauth}}\", se usarán las credenciales del usuario con el cual se ejecuta el servidor web.", - "config-mssql-sqlauth": "Autenticación de SQL Server", - "config-mssql-windowsauth": "Autenticación de Windows", "config-site-name": "Nombre del wiki:", "config-site-name-help": "Esto aparecerá en la barra de título del navegador y en varios otros lugares.", "config-site-name-blank": "Escribe un nombre de sitio.", diff --git a/includes/installer/i18n/et.json b/includes/installer/i18n/et.json index 2cd5dd2049..a981d201e2 100644 --- a/includes/installer/i18n/et.json +++ b/includes/installer/i18n/et.json @@ -39,7 +39,6 @@ "config-diff3-bad": "Tekstivõrdluse vahendit GNU diff3 ei leitud. Saad seda eirata, aga võid sattuda edaspidi sagedamini redigeerimiskonfliktidesse.", "config-db-type": "Andmebaasi tüüp:", "config-db-name": "Andmebaasi nimi (sidekriipsudeta):", - "config-db-name-oracle": "Andmebaasi skeem:", "config-db-username": "Andmebaasi kasutajanimi:", "config-db-password": "Andmebaasi parool:", "config-db-port": "Andmebaasi port:", diff --git a/includes/installer/i18n/eu.json b/includes/installer/i18n/eu.json index 4e004f9301..cd6c110e2a 100644 --- a/includes/installer/i18n/eu.json +++ b/includes/installer/i18n/eu.json @@ -85,13 +85,9 @@ "config-db-type": "Datu-base mota:", "config-db-host": "Datu-basearen zerbitzaria:", "config-db-host-help": "Zure datu-basearen zerbitzaria beste zerbitzari batean badago, sartu ostalariaren izena edo IP helbidea hemen.\n\nPartekatutako web-ostatua erabiltzen ari bazara, zure ostalaritza-hornitzaileak dokumentazio-ostalariaren izen egokia eman beharko lizuke.\n\nWindows zerbitzari batean instalatzen bazara eta MySQL erabiliz, \"localhost\" agian ez du zerbitzariaren izenerako funtzionatuko. Ez badago, saiatu \"127.0.0.1\" tokiko IP helbideetarako.\n\nPostgreSQL erabiltzen ari bazara, utzi eremu hau hutsik Unix socket bidez konektatzeko.", - "config-db-host-oracle": "Datu-baseko TNS:", - "config-db-host-oracle-help": "Sartu baliozko [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Konekzio izan lokala]; instalazio honetarako tnsnames.ora fitxategia ikusgai egon behar da.
Bezeroen 10g liburutegiak edo berriagoak erabiltzen ari bazara, [http://download.oracle.com/docs/cd/E11882_01/network.112 ere erabil dezakezu. /e10836/naming.htm Konektatzeko erraza] izendatzeko metodoa.", "config-db-wiki-settings": "Wiki hau identifikatu", "config-db-name": "Datu-base izena:", "config-db-name-help": "Aukeratu zure Wikia identifikatzen duen izena.\nEzin dira espazioak eabili.\n\nErabiltzen ari bazara web hosting partekatua, hostin-eko hornitzaileak emango dizu datu-basearen izen espezifikoa edo kontrol panel baten bitzrtez zure datu-basea sortzea utziko dizu.", - "config-db-name-oracle": "Datu-baseko eskema:", - "config-db-account-oracle-warn": "Hiru euskarri onartzen dira Oracle datu-basearen euskarri gisa instalatzeko:\n\nInstalazio-prozesuaren zati gisa datu-basearen kontua sortu nahi baduzu, hornitu kontu bat SYSDBA rol datu-baseko kontu gisa instalatzeko eta webgunerako sarbide konturako nahi dituzun kredentzialak zehazteko; bestela, web-sarbideen kontua eskuz sortu eta hornitu kontu hori bakarrik (eskemaren objektuak sortzeko baimenak behar baditu) edo bi kontu ezberdin, bi pribilegio sortu eta sarbide mugatua eskaintzen dutenak.\n\nBeharrezko baimenak dituen kontu bat sortzeko gidoia instalazio honen \"mantentze/orakulu/\" direktorioan aurki daiteke. Kontuan izan kontu mugatu bat erabiliz kontu lehenetsiarekin mantentze-gaitasun guztiak desgaituko dituela.", "config-db-install-account": "Instalazio prozesuan erabili erabiltzaile kontua.", "config-db-username": "Datu-base lankide izena:", "config-db-password": "Datu-base pasahitza:", @@ -110,37 +106,24 @@ "config-pg-test-error": "Ezin da datu-basearekin konektatu $1: $2", "config-sqlite-dir": "SQLite -eko informazioaren direktorioa:", "config-sqlite-dir-help": "SQLite-k datu guztiak fitxategi bakarrean gordetzen ditu.\n\nHornitu duzun direktorioa web zerbitzariaren bidez idatzia izateko aukera eman beharko duu instalazioan zehar.\n\nEz da webgunearen bidez eskuragarri egon behar; horregatik zure PHP fitxategiak non dauden ez dugu erakutsi.\n\nInstalatzaileak .htaccess fitxategi bat idatziko du bertan, baina horrek huts egiten badu zure datu base gordinera norbait sar daiteke.\nErabiltzaileen datu gordinak (helbide elektronikoak, pasahitzak), ezabatutako berrikusketa eta gainontzeko datu mugatuak ere barnean hartuz.\n\nDatu-basea beste nonbait jartzearen inguruan hausnartu, adibidez, /var/lib/mediawiki/yourwiki-n.", - "config-oracle-def-ts": "Taula-toki lehenetsia:", - "config-oracle-temp-ts": "Aldi baterako taula:", "config-type-mysql": "MariaDB, MySQL edo bateragarria", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki-k onartzen du hurrengo datu-base sistemak:\n\n$1\n\nListan ez baduzu ikusten erabili nahi duzun sistema, jarraitu goiko argibideak aktibatzeko.", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] MediaWikiren lehenengoko helburua da eta primeran babesturik dago. MediaWikik ere [{{int:version-db-mariadb-url}} MariaDB]-rekin egiten du lan baita [{{int:version-db-percona-url}} Percona Server]-kin, MySQL-rekin balio dutenak. ([https://www.php.net/manual/en/mysqli.installation.php How to compile PHP with MySQL support])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] iturburu irekiko datu basea sistema famatua da MySQL-rako alternatiba bezala. ([https://www.php.net/manual/en/pgsql.installation.php How to compile PHP with PostgreSQL support])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] oso ondo onartzen duen datu-basearen sistema arina da.\n ([http://www.php.net/manual/en/pdo.installation.php How to compile PHP with SQLite support], uses PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] enpresa komertzial baten datu-basea da. ([http://www.php.net/manual/en/oci8.installation.php How to compile PHP with OCI8 support])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] Windows-entzako enpresa komertzial baten datu-basea da. ([https://www.php.net/manual/en/sqlsrv.installation.php How to compile PHP with SQLSRV support])", "config-header-mysql": "MySQL hobespenak", "config-header-postgres": "PostgreSQL hobespenak", "config-header-sqlite": "SQLite hobespenak", - "config-header-oracle": "Oracle hobespenak", - "config-header-mssql": "Microsoft SQL Server-en ezarpenak", "config-invalid-db-type": "Datu-base mota baliogabea.", "config-missing-db-name": "\"{{int:config-db-name}}\"-rentzako balioa sartu behar duzu.", "config-missing-db-host": "\"{{int:config-db-host}}\"-rentzako balioa sartu behar duzu.", - "config-missing-db-server-oracle": "\"{{int:config-db-host-oracle}}\"-rentzako balioa sartu behar duzu.", - "config-invalid-db-server-oracle": "\"$1\" TNS datu basea baliogabea.\nErabili \"TNS izena\" edo \"Konektagarritasun erraza\" katea ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods]).", "config-invalid-db-name": "Datu-basearen izen okerra \"$1\"\nErabil ezazu ASCII letrak bakarrik (a-z, A-Z), zenbakiak (09), behe-gidoiak (_) eta gidoiak (-)", "config-invalid-db-prefix": "Datu-basearen aurrizki okerra \"$1\"\nErabil ezazu ASCII letrak bakarrik (a-z, A-Z) behe-gidoiak (_) eta gidoiak (-)", "config-connection-error": "$1\n\nHost-a, erabiltzaile izena eta pasahitza egiaztatu eta saiatu berriro.", "config-invalid-schema": "MediaWikiko eskema okerra \"$1\"\nErabil ezazu ASCII letrak bakarrik (a-z, A-Z) behe-gidoiak (_).", - "config-db-sys-create-oracle": "Instalatzaileak bakarrik jasaten du SYSBDA kontu bat erabiltzaile kontu berri bat sortzeko.", - "config-db-sys-user-exists-oracle": "$1 erabiltzaile kontua dagoeneko existitzen da. SYSDBA kontu berri bat sortzeko erabili daiteke soilik!", "config-postgres-old": "PostgreSQL $1 edo berriagoa behar da. Zuk $2 badaukazu.", - "config-mssql-old": "Microsoft SQL Server $1 edo berriagoa behar da. Zuk $2 badaukazu.", "config-sqlite-name-help": "Aukeratu zure wikia identifikatzen duen izen bat.\nEz erabili zuriunerik edo gidoirik.\nHau erabiliko da SQLite datuen artxiborako.", "config-sqlite-parent-unwritable-group": "Ezin da datu-direktorioa sortu $1, web zerbitzariak ezin baitu $2 guraso direktorioan idatzi.\n\nInstalatzaileak webgunea exekutatzen ari den bitartean zure erabiltzailea zehaztu du.\nEgin $3 direktorioan idazteko gai izatea jarraitzeko.\nUnix/Linux sistema batean:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Ezin da datu-direktorioa sortu $1, web zerbitzariak ezin baitu $2 guraso direktorioan idatzi.\n\nInstalatzaileak webgunea exekutatzen ari den bitartean zure erabiltzailea zehaztu dezake.\nEgin $3 direktorioa globalean idazteko gai izatea (horretarako eta besteentzako!) jarraitzeko.\nUnix/Linux sistema batean:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -164,11 +147,6 @@ "config-mysql-engine": "Biltegiratze motorea:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "InnoDB ia beti aukerarik onena da, konkurrentzia-laguntza ona duelako.\n\nMyISAM erabiltzaile bakarreko edo irakurketa bakarreko instalazioetan azkarragoa izan daiteke.\nMyISAM datu-basea gehiagokotan hondatuta ageri da InnoDB datu-baseareakin baino.", - "config-mssql-auth": "Autentifikazio mota:", - "config-mssql-install-auth": "Aukeratu instalazio prozesuan zehar datu-basera konektatzeko erabiliko den autentifikazio mota.\n\"{{Int: config-mssql-windowsauth}}\" hautatzen baduzu, web zerbitzariak duen edozein erabiltzailek erabiliko duen kredentziala erabiliko da.", - "config-mssql-web-auth": "Aukeratu instalazio prozesuan zehar datu-base zerbitzariari konektatzeko erabiliko den autentifikazio mota.\n\"{{Int: config-mssql-windowsauth}}\" hautatzen baduzu, web zerbitzariak duen edozein erabiltzailek erabiliko duen kredentziala erabiliko da.", - "config-mssql-sqlauth": "SQL Serbidorearen Autentifikazioa", - "config-mssql-windowsauth": "Windows-eko Autentifikazioa.", "config-site-name": "Wikiaren izena:", "config-site-name-help": "Hau nabigatzailearen tituluaren lerroan agertuko da eta pare bat leku gehiagotan.", "config-site-name-blank": "Aukeratu webgunearen izena.", diff --git a/includes/installer/i18n/fa.json b/includes/installer/i18n/fa.json index 7cac681f2c..158e43d55f 100644 --- a/includes/installer/i18n/fa.json +++ b/includes/installer/i18n/fa.json @@ -97,13 +97,9 @@ "config-db-type": "نوع پایگاه اطلاعات:", "config-db-host": "میزبان پایگاه اطلاعات:", "config-db-host-help": "اگر سرور پایگاه اطلاعاتی شما در سرور دیگری است، نام گروه و آدرس آی‌پی را اینجا وارد کنید.\nاگر از میزبان شبکهٔ به اشتراک گذاشته‌شده استفاده می‌کنید، تهیه‌کنندهٔ خدمات میزبانی شما باید نام میزبان صحیح در اسناد و مدارک را به شما بدهد.\nاگر از مای‌اس‌کیو‌ال استفاده می‌کنید، ممکن است استفاده از «میزبان‌محلی» برای نام سرور کار نکند.اگر کار نکرد، «۱۲۷.۰.۰.۱» را برای آدرس آی‌پی محلی امتحان کنید.\nاگر از پستگرس‌کیوال استفاده می‌کنید، برای اتصال از طریق یک سوکت یونیکس این قسمت را خالی رها کنید.", - "config-db-host-oracle": "پایگاه اطلاعاتی تی‌ان‌اس:", - "config-db-host-oracle-help": "یک [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name] معتبر وارد کنید؛ پوشهٔ tnsnames.ora باید برای این نصب نمایان باشد.
اگر از کتابخانه‌های پردازشگر ۱۰جی یا جدیدتر استفاده می‌کنید،همچنین می‌توانید از روش نامبردهٔ [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect] استفاده کنید.", "config-db-wiki-settings": "این ویکی را شناسایی کنید.", "config-db-name": "نام پایگاه داده (بدون خط پیوند):", "config-db-name-help": "نامی را انتخاب کنید که ویکی شما را شناسایی کند.\nنباید شامل فاصله باشد.\nاگر از گروه شبکهٔ اشتراک‌گذاری استفاده می‌کنید، تهیه‌کنندهٔ گروهتان یا باید به شما نام یک پایگاه اطلاعاتی مشخص برای استفاده بدهد یا برای ایجاد پایگاه‌های اطلاعاتی از طریق یک کنترل پنل به شما اجازه بدهد.", - "config-db-name-oracle": "طرح کلی پایگاه اطلاعاتی:", - "config-db-account-oracle-warn": "برای نصب برنامهٔ اوراکل به عنوان پایگاه اطلاعاتی در بخش گذشته،سه سناریو پشتیبانی شده است:\nاگر مایل به ایجاد حساب پایگاه اطلاعاتی به عنوان بخشی از روند نصب هستید، لطفاً یک حساب با نقش اس‌وای‌اس‌دی‌بی‌ای به عنوان حساب پایگاه اطلاعاتی برای نصب تهیه کنید و اعتبارنامه‌های مطلوبی را برای حساب دردسترس شبکه تعیین کنید، به عبارتی دیگر یا می‌توانید حساب دردسترس شبکه را به طور دستی ایجاد کنید و تنها آن حساب را تهیه کنید (اگر مستلزم مجوزهایی برای ایجاد موضوعات طرح کلی باشد) یا دو حساب دیگر تهیه کنید،یکی با ایجاد مزایا و یک حساب محدود برای دسترسی شبکه.\nمتنی برای ایجاد یک حساب با مزایای لازم بنویسید که می‌تواند در فهرست\"نگهداری/برنامهٔ اوراکل\" این نصب یافت شود. به یاد داشته باشید که استفاده از یک حساب محدود،همهٔ قابلیت‌های نگهداری با حساب پیش‌فرض را غیرفعال خواهد کرد.", "config-db-install-account": "حساب کاربری برای نصب", "config-db-username": "نام کاربری پایگاه اطلاعات:", "config-db-password": "گذرواژه پایگاه‌های داده:", @@ -122,34 +118,22 @@ "config-pg-test-error": "نمی‌توان به پایگاه اطلاعاتی '''$1''' وصل شد: $2", "config-sqlite-dir": "فهرست اطلاعات اس‌کیو‌لایت:", "config-sqlite-dir-help": "اس‌کیولایت همهٔ اطلاعات را در یک پوشهٔ جداگانه ذخیره می‌کند.\nفهرستی را که به وجود‌ آوردید باید در طی نصب به‌ وسیلهٔ وب‌سرور قابل نوشتن باشد.\nنباید از طریق وب در دسترس باشد، به همین دلیل ما آن را در جایی که پوشه‌های پی‌اچ‌پی شما هست، قرار نمی‌دهیم.\nنصب کننده یک پوشهٔ .htaccess همراه آن خواهدآورد،اما اگر این کار را انجام ندهد،کسی می‌تواند به پایگاه اطلاعاتی شما دسترسی پیدا کند.\nاطلاعات خام کاربر شامل (آدرس‌های ایمیل، علامت‌‌ها با شماره‌های رمز عبور) به خوبی پاک کردن تغییرات و دیگر اطلاعات محرمانه در ویکی.\nقرار دادن پایگاه اطلاعاتی باهم را در جایی دیگر در نظر بگیرید، برای مثال در /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "جدول پیش فرض:", - "config-oracle-temp-ts": "جدول موقت:", "config-type-mysql": "MariaDB، مای‌اس‌کیو‌ال (یا سازگار)", - "config-type-mssql": "سرور مایکروسافت اس‌کیو‌ال", "config-support-info": "مدیاویکی سامانه‌های پایگاه اطلاعاتی زیر را حمایت می‌کند:\n$1\nاگر متوجه سامانه پایگاه اطلاعاتی که سعی دارید از فهرست زیر استفاده کنید، نمی‌شوید، بنابراین دستورالعمل‌های مرتبط در بالا را برای فعال کردن پشتیبانی دنبال کنید.", "config-dbsupport-mysql": "*[{{int:version-db-mariadb-url}} MariaDB] مهم‌ترین هدف برای مدیاویکی است و بهترین پشتیبانی. مدیاویکی همچنین کار می‌کند با [{{int:version-db-mysql-url}} MariaDB] و [{{int:version-db-percona-url}} Percona Server] که با MariaDB سازگار هستند.([https://www.php.net/manual/en/mysqli.installation.php چگونه php را با MariaDB کامپایل کنیم])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} پستگرس‌کیوال] یک سامانه پایگاه اطلاعات متن‌باز پر‌طرفدار است که جایگزینی برای مای‌اس‌کیوال است. ([https://www.php.net/manual/en/pgsql.installation.php راهنمای تنظیم کردن پی‌اچ‌پی به همراه پستگرس‌کیوال])", "config-dbsupport-sqlite": "*[{{int:version-db-sqlite-url}} اس‌کیولایت] یک سامانه پایگاه اطلاعاتی کم حجمی است که بسیار خوب پشتیبانی شده‌است.\n([https://www.php.net/manual/en/pdo.installation.php چگونگی کامپایل پی‌اچ‌پی با اس‌کیولایت]، از PDO استفاده می‌کند)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] یک پایگاه اطلاعاتی کار تبلیغاتی است.\n([https://www.php.net/manual/en/oci8.installation.php How to compile PHP with OCI8 support])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] یک پایگاه اطلاعاتی موسسهٔ تبلیغاتی برای وینذوز است. ([https://www.php.net/manual/en/sqlsrv.installation.php How to compile PHP with SQLSRV support])", "config-header-mysql": "تنظیمات MariaDB/مای‌اس‌کیو‌ال", "config-header-postgres": "تنظیمات پست‌گر‌اس‌کیو‌ال", "config-header-sqlite": "تنظیمات اس‌کیو‌لایت", - "config-header-oracle": "تنظیمات اوراکل", - "config-header-mssql": "تنظیمات سرور مایکرپسافت اس‌کیو‌ال", "config-invalid-db-type": "نوع پایگاه اطلاعاتی نامعتبر", "config-missing-db-name": "شما باید یک مقدار برای \"نام {{int:config-db-name}}\" وارد کنید", "config-missing-db-host": "شما باید یک مقدار برای \"گروه {{int:config-db-host}}\" وارد کنید", - "config-missing-db-server-oracle": "شما باید یک مقدار برای \"تی‌ان‌اس {{int:config-db-host-oracle}}\" وارد کنید", - "config-invalid-db-server-oracle": "تی‌ان‌اس پایگاه اطلاعاتی $1 نامعتبر.\nیا از \"نام تی‌ان‌اس\" یا یک سلسله \"ارتباط آسان\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods]) استفاده کنید.", "config-invalid-db-name": "نام پایگاه اطلاعاتی نامعتبر \"$1\".\nفقط حروف اِی‌اس‌سی‌آی‌آی بزرگ (اِی-زدکوچک،اِی-زد بزرگ)،اعداد (۰-۹)،آندرلاین (_) و خط تیره کوتاه (-) استفاده کنید.", "config-invalid-db-prefix": "پیشوند پایگاه اطلاعاتی نامعتبر \"$1\".\nفقط حروف اِی‌اس‌سی‌آی‌آی بزرگ (اِی-زدکوچک،اِی-زد بزرگ)،اعداد (۰-۹)،آندرلاین (_) و خط تیره کوتاه (-) استفاده کنید.", "config-connection-error": "$1.\n\nمیزبان، نام کاربری و گذرواژه را بررسی کرده و دوباره امتحان کنید. اگر از «میزبان محلی» به عنوان میزبان پایگاه داده استفاده می‌کنید، استفاده از «۱۲۷.۰.۰.۱» را امتحان کنید (یا برعکس).", "config-invalid-schema": "طرح‌کلی برای مدیاویکی نامعتبر \"$1\".\nفقط حروف اِی‌اس‌سی‌آی‌آی بزرگ (اِی-زدکوچک،اِی-زد بزرگ)،اعداد (۰-۹)،آندرلاین (_) و خط تیره کوتاه (-) استفاده کنید.", - "config-db-sys-create-oracle": "نصب‌کننده تنها از استفادهٔ یک حساب اس‌وای‌اس‌دی‌بی‌اِی برای ایجاد یک حساب جدید حمایت می‌کند.", - "config-db-sys-user-exists-oracle": "حساب کاربری \"$1\" در‌حال‌حاضر وجود دارد.تنها اس‌وای‌اس‌دی‌بی‌اِی می‌تواند برای ایجاد یک حساب جدید استفاده شود!", "config-postgres-old": "پستگِرِاس‌کیو‌ال نسخهٔ $1 یا بالاتر لازم است. شما نسخهٔ $2 را دارید.", - "config-mssql-old": "سرور مایکروسافت اس‌کیو‌ال $1 یا اخیر آن لازم است. شما $2 را دارید.", "config-sqlite-name-help": "نامی را انتخاب کنید که ویکی شما را شناسایی می‌کند.\nاز فاصله‌ها یا خط‌های تیره کوتاه استفاده نکنید.\nاین برای نام پوشهٔ اطلاعات اس‌کیولایت استفاده خواهد‌شد.", "config-sqlite-parent-unwritable-group": "فهرست اطلاعات $1 نمی‌تواند ایجاد شود، چون فهرست منشأ $2 توسط سرور شبکه قابل نوشتن نیست.\nنصب کننده، کاربری را که سرور شبکه شما را اجرا می‌کند، مشخص کرده‌است.\nبرای ادامه دادن،فهرستی قابل نوشتن $3 توسط آن ایجاد کنید.\nدر یک سامانه یونیکس/لینوکس انجام می‌دهد:\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "فهرست اطلاعات $1 نمی‌تواند ایجاد شود، چون فهرست منشأ $2 توسط کارساز شبکه قابل نوشتن نیست.\nنصب کننده، کاربری را که سرور شبکه شما را اجرا می‌کند، نتوانست مشخص کند.\nفهرست کلی قابل نوشتن $3 توسط آن (و دیگران!) برای ادامه دادن،ایجاد کنید.\nدر یک سامانه یونیکس/لینوکس انجام می‌دهد:\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -174,11 +158,6 @@ "config-mysql-engine": "موتور ذخیره سازی:", "config-mysql-innodb": "اینودی‌بی (پیشنهاد می‌شود)", "config-mysql-engine-help": "'''اینودی‌بی''' تقریباً همیشه بهترین گزینه است،زیرا پشتیبانی همزمان خوبی دارد.\n'''مای‌آی‌اس‌ای‌ام''' ممکن است در نصب‌های کاربر جداگانه یا فقط خواندنی سریع‌تر باشد.\nپایگاه‌های اطلاعاتی مای‌آی‌اس‌ای‌ام اغلب بیشتر از پایگاه‌های اطلاعاتی اینودی‌بی مستعد ازبین رفتن هستند.", - "config-mssql-auth": "نوع تأیید:", - "config-mssql-install-auth": "نوع تأییدی را که برای اتصال به پایگاه اطلاعاتی حین فرآیند نصب مورد استفاده قرار گیرد را انتخاب کنید.\nاگر \"{{int:config-mssql-windowsauth}}\" را انتخاب می‌کنید، اعتبارات هرآنچه کاربر وب سرور به عنوان آن مورد استفاده قرار می‌دهد مورد استفاده قرار خواهد گرفت.", - "config-mssql-web-auth": "نوع تأییدی را که کارساز وب به‌وسیلهٔ آن برای کارهای معمولی به پایگاه اطلاعاتی متصل خواهد شد را انتخاب کنید.\nاگر «{{int:config-mssql-windowsauth}}» را انتخاب می‌کنید، اعتبارات هرآنچه کاربر وب سرور به عنوان آن مورد استفاده قرار می‌دهد مورد استفاده قرار خواهد گرفت.", - "config-mssql-sqlauth": "تأیید سرور اس‌کیوال", - "config-mssql-windowsauth": "تأیید ویندوز", "config-site-name": "نام ویکی:", "config-site-name-help": "این در نوار عنوان مرورگر و در دیگر جاهای مختلف ظاهر خواهد‌شد.", "config-site-name-blank": "نام تارنما را وارد کنید.", diff --git a/includes/installer/i18n/fi.json b/includes/installer/i18n/fi.json index 8c338f85c7..b9ecf984a7 100644 --- a/includes/installer/i18n/fi.json +++ b/includes/installer/i18n/fi.json @@ -97,11 +97,9 @@ "config-db-type": "Tietokannan tyyppi:", "config-db-host": "Tietokantapalvelin:", "config-db-host-help": "Jos tietokantapalvelimesi sijaitsee eri palvelimella, syötä palvelimen nimi tai ip-osoite tähän.\n\nJos käytössäsi on ulkoinen palveluntarjoaja, pitäisi palvelimen nimen löytyä yrityksen ohjesivuilta.\n\nJos käytät MySQL:ää, ei palvelimen nimi \"localhost\" välttämättä toimi. Tässä tapauksessa koita käyttää osoitetta 127.0.0.1.\n\nJos käytät PostgreSQL:ää jätä tämä kenttä tyhjäksi.", - "config-db-host-oracle": "Tietokannan TNS:", "config-db-wiki-settings": "Identifioi tämä wiki", "config-db-name": "Tietokannan nimi (ei väliviivoja):", "config-db-name-help": "Valitse wikiäsi kuvaava nimi.\nNimessä ei saa olla välilyöntejä.\n\nMikäli et pysty itse hallitsemaan tietokantojasi, pyydä palveluntarjoajaasi luomaan tietokanta tai tee se palveluntarjoajasi hallintapaneelissa.", - "config-db-name-oracle": "Tietokannan rakenne:", "config-db-install-account": "Asennuksessa käytettävä käyttäjätili", "config-db-username": "Tietokannan käyttäjätunnus:", "config-db-password": "Tietokannan salasana:", @@ -120,37 +118,24 @@ "config-pg-test-error": "Tietokantaan $1 ei voida muodostaa yhteyttä: $2", "config-sqlite-dir": "SQLiten datahakemisto:", "config-sqlite-dir-help": "SQLite tallentaa kaiken sisällön yhteen tiedostoon.\n\nPalvelimen pitää pystyä kirjoittamaan tietoa hakemistoon asennuksen aikana.\n\nHakemiston ei tulisi olla nähtävissä www-selaimella. Siksi hakemisto on eri kuin missä PHP-tiedostot sijaitsevat.\n\nAsennusohjelma luo .htaccess-tiedoston, mutta jos sen luomisessa ilmenee ongelmia joku voi päästä käsiksi tietokantaasi. \nTietokannassa on kaikki sähköpostiosoitteet, salasanat, poistetut versiot ja kaikki muu tieto, joka ei näy wikissä.\n\nSuosittelemme tallentamaan tietokannan eri hakemistoon, esimerkiksi /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Oletus taulukkotila:", - "config-oracle-temp-ts": "Väliaikainen taulukkotila:", "config-type-mysql": "MariaDB, MySQL tai yhteensopiva", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki tukee seuraavia tietokantajärjestelmiä:\n\n$1\n\nJos et näe tietokantajärjestelmää, jota yrität käyttää, listattuna alhaalla, seuraa yläpuolella olevia ohjeita tuen aktivoimiseksi.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] on MediaWikin ensisijainen kohde ja se on myös parhaiten tuettu. MediaWiki voi myös käyttää [{{int:version-db-mysql-url}} MySQL]- sekä [{{int:version-db-percona-url}} Percona Server]-järjestelmiä, jotka ovat MariaDB-yhteensopivia. ([https://www.php.net/manual/en/mysqli.installation.php Miten käännetään PHP MySQL-tuella])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] on suosittu avoimen lähdekoodin tietokantajärjestelmä vaihtoehtona MySQL:lle. ([https://www.php.net/manual/en/pgsql.installation.php Kuinka käännetään PHP PostgreSQL-tuella])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] on kevyt tietokantajärjestelmä, jota tuetaan hyvin. ([https://www.php.net/manual/en/pdo.installation.php Miten käännetään PHP SQLite-tuella], käyttää PDO:ta)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] on kaupallinen yritystietokanta. ([https://www.php.net/manual/en/oci8.installation.php Kuinka käännetään PHP OCI8-tuella])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] on kaupallinen yritystietokanta Windowsille. ([https://www.php.net/manual/en/sqlsrv.installation.php Miten käännetään PHP SQLSRV-tuella])", "config-header-mysql": "MariaDB/MySQL-asetukset", "config-header-postgres": "PostgreSQL-asetukset", "config-header-sqlite": "SQLite-asetukset", - "config-header-oracle": "Oracle-asetukset", - "config-header-mssql": "Microsoft SQL Server asetukset", "config-invalid-db-type": "Virheellinen tietokantatyyppi", "config-missing-db-name": "\"{{int:config-db-name}}\" on pakollinen.", "config-missing-db-host": "\"{{int:config-db-host}}\" on pakollinen.", - "config-missing-db-server-oracle": "\"{{int:config-db-host-oracle}}\" on pakollinen.", - "config-invalid-db-server-oracle": "Virheellinen tietokanta TNS \"$1\".\nKäytä joko \"TNS Name\"- tai \"Easy Connect\" -tekstiä\n([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle metodien nimeäminen]).", "config-invalid-db-name": "”$1” ei kelpaa tietokannan nimeksi.\nKäytä ainoastaan kirjaimia (a-z, A-Z), numeroita (0-9), alaviivoja (_) ja tavuviivoja (-).", "config-invalid-db-prefix": "”$1” ei kelpaa tietokannan etuliitteeksi.\nKäytä ainoastaan kirjaimia (a-z, A-Z), numeroita (0-9), alaviivoja (_) ja tavuviivoja (-).", "config-connection-error": "$1.\n\nTarkista isäntä, käyttäjänimi, salasana ja yritä uudestaan. Jos käytät \"localhost\" tietokannan isäntänä, kokeile käyttää \"127.0.0.1\" sen sijaan (tai toisinpäin).", "config-invalid-schema": "Virheellinen skeema MediaWikille \"$1\".\nKäytä pelkkiä ASCII-kirjaimia (a-z, A-Z), numeroita (0-9) ja alaviivoja (_).", - "config-db-sys-create-oracle": "Asennusohjelma tukee ainoastaan SYSDBA-tunnuksen käyttämistä uuden tunnuksen luonnissa.", - "config-db-sys-user-exists-oracle": "Käyttäjätunnus \"$1\" on jo olemassa. SYSDBA:ta voidaan käyttää vain uuden tunnuksen luontiin!", "config-postgres-old": "MediaWiki tarvitsee PostgreSQL:n version $1 tai uudemman. Nykyinen versio on $2.", - "config-mssql-old": "Vaaditaan Microsoft SQL Server $1 tai uudempi. Sinulla on käytössä $2.", "config-sqlite-name-help": "Valitse nimi, joka yksilöi tämän wikin.\nÄlä käytä välilyöntejä tai viivoja.\nNimeä käytetään SQLite-tietokannan tiedostonimessä.", "config-sqlite-mkdir-error": "Virhe luodessa datakansiota \"$1\".\nTarkista sijainti ja yritä uudelleen", "config-sqlite-dir-unwritable": "Hakemistoon ”$1” kirjoittaminen epäonnistui.\nMuuta hakemiston käyttöoikeuksia siten, että palvelinohjelmisto voi kirjoittaa siihen ja yritä uudelleen.", @@ -171,11 +156,6 @@ "config-db-web-no-create-privs": "Tilillä jota käytetään asennuksessa ei ole oikeuksia luoda uutta tiliä.\nTähän määriteltävä tili täytyy olla jo olemassa.", "config-mysql-engine": "Tallennusmoottori", "config-mysql-innodb": "InnoDB (suositeltu)", - "config-mssql-auth": "Varmennuksen tyyppi:", - "config-mssql-install-auth": "Valitse varmennuksen tyyppi, jota käytetään yhdistäessä tietokantaan asennuksen aikana.\nJos valitset \"{{int:config-mssql-windowsauth}}\", käytetään verkkopalvelimen käyttäjän kirjautumistietoja.", - "config-mssql-web-auth": "Valitse varmennuksen tyyppi, jota verkkopalvelin käyttää yhdistäessään tietokantapalvelimeen wikin tavallisen toiminnan aikana.\nJos valitset \"{{int:config-mssql-windowsauth}}\", käytetään verkkopalvelimen käyttäjän kirjautumistietoja.", - "config-mssql-sqlauth": "SQL Server varmennus", - "config-mssql-windowsauth": "Windows-varmennus", "config-site-name": "Wikin nimi:", "config-site-name-help": "Tämä näkyy selaimen otsikkona ja muissa kohdissa.", "config-site-name-blank": "Kirjoita sivuston nimi.", diff --git a/includes/installer/i18n/fr.json b/includes/installer/i18n/fr.json index b07c83e493..fddb6a2157 100644 --- a/includes/installer/i18n/fr.json +++ b/includes/installer/i18n/fr.json @@ -114,13 +114,9 @@ "config-db-type": "Type de base de données :", "config-db-host": "Nom d’hôte de la base de données :", "config-db-host-help": "Si votre serveur de base de données est sur un serveur différent, saisissez ici son nom d’hôte ou son adresse IP.\n\nSi vous utilisez un hébergement mutualisé, votre hébergeur doit vous avoir fourni le nom d’hôte correct dans sa documentation.\n\nSi vous utilisez MySQL, « localhost » peut ne pas fonctionner comme nom de serveur. S’il ne fonctionne pas, essayez « 127.0.0.1 » comme adresse IP locale.\n\nSi vous utilisez PostgreSQL, laissez ce champ vide pour vous connecter via un socket Unix.", - "config-db-host-oracle": "Nom TNS de la base de données :", - "config-db-host-oracle-help": "Entrez un [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm nom de connexion locale] valide ; un fichier tnsnames.ora doit être visible par cette installation.
Si vous utilisez les bibliothèques clientes version 10g ou plus récentes, vous pouvez également utiliser la méthode de nommage [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifier ce wiki", "config-db-name": "Nom de la base de données (sans tirets):", "config-db-name-help": "Choisissez un nom qui identifie votre wiki.\nIl ne doit pas contenir d'espaces.\n\nSi vous utilisez un hébergement web partagé, votre hébergeur vous fournira un nom spécifique de base de données à utiliser, ou bien vous permet de créer des bases de données via un panneau de contrôle.", - "config-db-name-oracle": "Schéma de base de données :", - "config-db-account-oracle-warn": "Il existe trois scénarios pris en charge pour l’installation d'Oracle comme backend de base de données:\n\nSi vous souhaitez créer un compte de base de données dans le cadre de la procédure d’installation, veuillez fournir un compte avec le rôle de SYSDBA comme compte de base de données pour l’installation et spécifier les informations d’identification souhaitées pour le compte d'accès au web, sinon vous pouvez créer le compte d’accès web manuellement et fournir uniquement ce compte (si elle a exigé des autorisations nécessaires pour créer les objets de schéma) ou fournir deux comptes différents, l’un avec les privilèges pour créer et l'autre restreint, pour l’accès web.\n\nUn script pour créer un compte avec des privilèges requis peut être trouvé dans le répertoire « entretien/oracle/ » de cette installation. N’oubliez pas que le fait de l’utilisation d’un compte limité désactive toutes les fonctionnalités d’entretien avec le compte par défaut.", "config-db-install-account": "Compte d'utilisateur pour l'installation", "config-db-username": "Nom d’utilisateur de la base de données :", "config-db-password": "Mot de passe de la base de données :", @@ -139,37 +135,24 @@ "config-pg-test-error": "Impossible de se connecter à la base de données '''$1''' : $2", "config-sqlite-dir": "Dossier des données SQLite :", "config-sqlite-dir-help": "SQLite stocke toutes les données dans un fichier unique.\n\nLe répertoire que vous fournissez doit être accessible en écriture par le serveur lors de l'installation.\n\nIl '''ne faut pas''' qu'il soit accessible via le web, c'est pourquoi il n'est pas à l'endroit où sont vos fichiers PHP.\n\nL'installateur écrira un fichier .htaccess en même temps, mais s'il y a échec, quelqu'un peut accéder à votre base de données.\nCela comprend les données des utilisateurs (adresses de courriel, mots de passe hachés) ainsi que des révisions supprimées et d'autres données confidentielles du wiki.\n\nEnvisagez de placer la base de données ailleurs, par exemple dans /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Espace de stockage (''tablespace'') par défaut :", - "config-oracle-temp-ts": "Espace de stockage (''tablespace'') temporaire :", "config-type-mysql": "MariaDB, MySQL , ou compatible", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki prend en charge ces systèmes de bases de données :\n\n$1\n\nSi vous ne voyez pas le système de base de données que vous essayez d’utiliser ci-dessous, alors suivez les instructions ci-dessus (voir liens) pour activer la prise en charge.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] est le premier choix pour MediaWiki et est le mieux pris en charge. MediaWiki fonctionne aussi avec [{{int:version-db-mysql-url}} MySQL] et [{{int:version-db-percona-url}} Percona Server], qui sont compatibles avec MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Comment compiler PHP avec la prise en charge de MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] est un système de base de données populaire en ''source ouverte'' qui peut être une alternative à MySQL ([https://www.php.net/manual/en/pgsql.installation.php Comment compiler PHP avec la prise en charge de PostgreSQL]).", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] est un système de base de données léger bien pris en charge ([https://www.php.net/manual/en/pdo.installation.php Comment compiler PHP avec la prise en charge de SQLite], en utilisant PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] est un système commercial de gestion de base de données d’entreprise. ([https://www.php.net/manual/en/oci8.installation.php Comment compiler PHP avec la prise en charge d’OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] est une base de données commerciale d’entreprise pour Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Comment compiler PHP avec la prise en charge de SQLSRV])", "config-header-mysql": "Paramètres de MariaDB/MySQL", "config-header-postgres": "Paramètres de PostgreSQL", "config-header-sqlite": "Paramètres de SQLite", - "config-header-oracle": "Paramètres d’Oracle", - "config-header-mssql": "Paramètres de Microsoft SQL Server", "config-invalid-db-type": "Type de base de données non valide", "config-missing-db-name": "Vous devez entrer une valeur pour « {{int:config-db-name}} ».", "config-missing-db-host": "Vous devez entrer une valeur pour « {{int:config-db-host}} ».", - "config-missing-db-server-oracle": "Vous devez entrer une valeur pour « {{int:config-db-host-oracle}} ».", - "config-invalid-db-server-oracle": "Le nom TNS de la base de données (« $1 ») est invalide.\nUtilisez uniquement la chaîne \"TNS Name\" ou \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Méthodes de nommage Oracle])", "config-invalid-db-name": "Nom de la base de données invalide (« $1 »).\nUtiliser seulement les lettres ASCII (a-z, A-Z), les chiffres (0-9), les caractères de soulignement (_) et les tirets (-).", "config-invalid-db-prefix": "Préfixe de la base de données non valide « $1 ».\nUtiliser seulement les lettres ASCII (a-z, A-Z), les chiffres (0-9), les caractères de soulignement (_) et les tirets (-).", "config-connection-error": "$1.\n\nVérifier le nom d’hôte, le nom d’utilisateur et le mot de passe ci-dessous puis réessayer. Si vous utilisez « localhost » comme hôte de base de données, essayez d’utiliser « 127.0.0.1 » à la place (ou inversement).", "config-invalid-schema": "Schéma invalide pour MediaWiki « $1 ».\nUtiliser seulement les lettres ASCII (a-z, A-Z), les chiffres (0-9) et les caractères de soulignement (_).", - "config-db-sys-create-oracle": "L'installateur ne reconnaît que le compte SYSDBA lors de la création d'un nouveau compte.", - "config-db-sys-user-exists-oracle": "Le compte « $1 » existe déjà. Seul SYSDBA peut être utilisé pour créer un nouveau compte.", "config-postgres-old": "PostgreSQL $1 ou version ultérieure est requis. Vous avez $2.", - "config-mssql-old": "Microsoft SQL Server version $1 ou supérieur est requis. Vous avez la version $2.", "config-sqlite-name-help": "Choisir un nom qui identifie votre wiki.\nNe pas utiliser d'espaces ni de traits d'union.\nIl sera utilisé pour le fichier de données SQLite.", "config-sqlite-parent-unwritable-group": "Impossible de créer le répertoire de données $1, parce que le répertoire parent $2 n'est pas accessible en écriture par le serveur Web.\n\nL'installateur a détecté sous quel nom d'utilisateur, le serveur web est actif.\nRendre le répertoire $3 accessible en écriture pour continuer.\nSur un système UNIX/Linux, saisir :\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Impossible de créer le répertoire de données $1, parce que le répertoire parent $2 n'est pas accessible en écriture par le serveur Web.\n\nL'installateur n'a pas pu déterminer le nom de l'utilisateur sous lequel le serveur s'exécute.\nRendre le répertoire $3 globalement accessible en écriture pour continuer.\nSur un système UNIX/Linux, saisir :\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -194,11 +177,6 @@ "config-mysql-engine": "Moteur de stockage :", "config-mysql-innodb": "InnoDB (recommandé)", "config-mysql-engine-help": "InnoDB est presque toujours la meilleure option, car il prend bien en charge les accès concurrents.\n\nMyISAM peut être plus rapide dans les installations monoposte ou en lecture seule.\nLes bases de données MyISAM ont tendance à se corrompre plus souvent que les bases d’InnoDB.", - "config-mssql-auth": "Type d’authentification :", - "config-mssql-install-auth": "Sélectionner le type d’authentification qui sera utilisé pour se connecter à la base de données pendant le processus d’installation.\nSi vous sélectionnez « {{int:config-mssql-windowsauth}} », les informations d’identification de l’utilisateur faisant tourner le serveur seront utilisées.", - "config-mssql-web-auth": "Sélectionner le type d’authentification que le serveur web utilisera pour se connecter au serveur de base de données lors des opérations habituelles du wiki.\nSi vous sélectionnez « {{int:config-mssql-windowsauth}} », les informations d’identification de l’utilisateur sous lequel tourne le serveur web seront utilisées.", - "config-mssql-sqlauth": "Authentification de SQL Server", - "config-mssql-windowsauth": "Authentification Windows", "config-site-name": "Nom du wiki :", "config-site-name-help": "Ceci apparaîtra dans la barre de titre du navigateur et en divers autres endroits.", "config-site-name-blank": "Entrez un nom de site.", diff --git a/includes/installer/i18n/frc.json b/includes/installer/i18n/frc.json index 7126f90284..20f30a3d7a 100644 --- a/includes/installer/i18n/frc.json +++ b/includes/installer/i18n/frc.json @@ -37,15 +37,10 @@ "config-db-wiki-account": "Compte d'useur pour le fonctionnement normal", "config-db-wiki-help": "Entrez le nom d'useur et le mot de passe qui seront usés pour se connecter à la base de données pendant le fonctionnement normal du wiki.\nSi le compte existe pas, et le compte d'installation dispose de privilèges suffisants, ce compte d'useur sera créé avec les privilèges minimum requis pour faire fonctionner le wiki.", "config-db-prefix": "Préfixe des tables de la base de données:", - "config-oracle-def-ts": "Espace de stockage (''tablespace'') par défaut:", - "config-oracle-temp-ts": "Espace de stockage (''tablespace'') temporaire:", "config-type-mysql": "MySQL (ou compatible)", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "Paramètres de MySQL", "config-header-postgres": "Paramètres de PostgreSQL", "config-header-sqlite": "Paramètres de SQLite", - "config-header-oracle": "Paramètres d’Oracle", - "config-header-mssql": "Paramètres de Microsoft SQL Server", "config-invalid-db-type": "Type de base de données non valide", "config-sqlite-name-help": "Choisir un nom qui identifie ton wiki.\nFait user pas ni d'espaces ni des traits d'union\nIl va user pour fichier de données SQLite.", "config-mysql-innodb": "InnoDB", diff --git a/includes/installer/i18n/frp.json b/includes/installer/i18n/frp.json index bc35fc24ac..3c4d60286e 100644 --- a/includes/installer/i18n/frp.json +++ b/includes/installer/i18n/frp.json @@ -35,10 +35,8 @@ "config-diff3-bad": "GNU diff3 entrovâblo.", "config-db-type": "Tipo de bâsa de balyês :", "config-db-host": "Hôto de la bâsa de balyês :", - "config-db-host-oracle": "TNS de la bâsa de balyês :", "config-db-wiki-settings": "Identifiar cél vouiqui", "config-db-name": "Nom de la bâsa de balyês :", - "config-db-name-oracle": "Plan de bâsa de balyês :", "config-db-install-account": "Compto usanciér por l’enstalacion", "config-db-username": "Nom d’usanciér de la bâsa de balyês :", "config-db-password": "Contresegno de la bâsa de balyês :", @@ -49,16 +47,12 @@ "config-db-schema": "Plan por MediaWiki", "config-pg-test-error": "Empossiblo de sè branchiér a la bâsa de donâs '''$1''' : $2", "config-sqlite-dir": "Dossiér de les balyês SQLite :", - "config-oracle-def-ts": "Èspâço de stocâjo (''tablespace'') per dèfôt :", - "config-oracle-temp-ts": "Èspâço de stocâjo (''tablespace'') temporèro :", "config-header-mysql": "Paramètres de MySQL", "config-header-postgres": "Paramètres de PostgreSQL", "config-header-sqlite": "Paramètres de SQLite", - "config-header-oracle": "Paramètres d’Oracle", "config-invalid-db-type": "Tipo de bâsa de balyês envalido", "config-missing-db-name": "Vos dête buchiér una valor por « Nom de la bâsa de balyês »", "config-missing-db-host": "Vos dête buchiér una valor por « Hôto de la bâsa de balyês »", - "config-missing-db-server-oracle": "Vos dête buchiér una valor por « TNS de la bâsa de balyês »", "config-sqlite-readonly": "Lo fichiér $1 est pas accèssiblo en ècritura.", "config-regenerate": "Refâre LocalSettings.php →", "config-show-table-status": "Falyita de la requéta SHOW TABLE STATUS !", diff --git a/includes/installer/i18n/gl.json b/includes/installer/i18n/gl.json index c75d129759..4394a85de3 100644 --- a/includes/installer/i18n/gl.json +++ b/includes/installer/i18n/gl.json @@ -87,13 +87,9 @@ "config-db-type": "Tipo de base de datos:", "config-db-host": "Servidor da base de datos:", "config-db-host-help": "Se o servidor da súa base de datos está nun servidor diferente, escriba o nome do servidor ou o enderezo IP aquí.\n\nSe está usando un aloxamento web compartido, o seu provedor de hospedaxe debe darlle o nome de servidor correcto na súa documentación.\n\nSe está a realizar a instalación nun servidor de Windows con MySQL, o nome \"localhost\" pode non valer como servidor. Se non funcionase, inténteo con \"127.0.0.1\" como enderezo IP local.\n\nSe está usando PostgreSQL, deixe este campo en branco para facer a conexión a través do conectador Unix.", - "config-db-host-oracle": "TNS da base de datos:", - "config-db-host-oracle-help": "Insira un [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm nome de conexión local] válido; cómpre que haxa visible un ficheiro tnsnames.ora para esta instalación.
Se está a empregar bibliotecas cliente versión 10g ou máis recentes, tamén pode usar o método de atribución de nomes [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identificar o wiki", "config-db-name": "Nome da base de datos:", "config-db-name-help": "Escolla un nome que identifique o seu wiki.\nNon debe conter espazos.\n\nSe está usando un aloxamento web compartido, o seu provedor de hospedaxe daralle un nome específico para a base de datos ou deixaralle crear unha a través do panel de control.", - "config-db-name-oracle": "Esquema da base de datos:", - "config-db-account-oracle-warn": "Existen tres escenarios soportados para a instalación de Oracle como fin da base de datos:\n\nSe quere crear unha conta para a base de datos como parte do proceso de instalación, proporcione unha conta co papel SYSDBA e especifique as credenciais desexadas para a conta; senón pode crear a conta manualmente e dar só esa conta (se ten os permisos necesarios para crear os obxectos do esquema) ou fornecer dous contas diferentes, unha con privilexios de creación e outra restrinxida para o acceso á web.\n\nA escritura para crear unha conta cos privilexios necesarios atópase no directorio \"maintenance/oracle/\" desta instalación. Teña en conta que o emprego de contas restrinxidas desactivará todas as operacións de mantemento da conta predeterminada.", "config-db-install-account": "Conta de usuario para a instalación", "config-db-username": "Nome de usuario da base de datos:", "config-db-password": "Contrasinal da base de datos:", @@ -112,37 +108,24 @@ "config-pg-test-error": "Non se pode conectar coa base de datos $1: $2", "config-sqlite-dir": "Directorio de datos SQLite:", "config-sqlite-dir-help": "SQLite recolle todos os datos nun ficheiro único.\n\nO servidor web debe ter permisos sobre o directorio para que poida escribir nel durante a instalación.\n\nAdemais, o servidor non debe ser accesible a través da web, motivo polo que non está no mesmo lugar ca os ficheiros PHP.\n\nAsemade, o programa de instalación escribirá un ficheiro .htaccess, pero se erra alguén pode obter acceso á súa base de datos.\nIsto inclúe datos de usuario (enderezos de correo electrónico, contrasinais codificados), así como revisións borradas e outros datos restrinxidos no wiki.\n\nConsidere poñer a base de datos nun só lugar, por exemplo en /var/lib/mediawiki/oseuwiki.", - "config-oracle-def-ts": "Espazo de táboas por defecto:", - "config-oracle-temp-ts": "Espazo de táboas temporal:", "config-type-mysql": "MariaDB, MySQL ou compatíbel", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki soporta os seguintes sistemas de bases de datos:\n\n$1\n\nSe non ve listado a continuación o sistema de base de datos que intenta usar, siga as instrucións ligadas enriba para activar o soporte.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] é o obxectivo principal para MediaWiki e é o que mellor soportado está. MediaWiki tamén funciona con [{{int:version-db-mysql-url}} MySQL] e [{{int:version-db-percona-url}} Percona Server], que son compatibles con MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Como compilar PHP con compatibilidade MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] é un sistema de base de datos popular e de código aberto como alternativa a MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Como compilar PHP con compatibilidade PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] é un sistema de base de datos lixeiro moi ben soportado. ([https://www.php.net/manual/en/pdo.installation.php Como compilar o PHP con soporte SQLite], emprega PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] é un sistema comercial de xestión de base de datos a nivel empresarial. ([https://www.php.net/manual/en/oci8.installation.php Como compilar PHP con soporte OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] é un sistema comercial de xestión de base de datos de nivel empresarial para Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Como compilar o PHP con compatibilidade SQLSRV])", "config-header-mysql": "Configuración MariaDB/MySQL", "config-header-postgres": "Configuración do PostgreSQL", "config-header-sqlite": "Configuración do SQLite", - "config-header-oracle": "Configuración do Oracle", - "config-header-mssql": "Configuración de Microsoft SQL Server", "config-invalid-db-type": "Tipo de base de datos incorrecto", "config-missing-db-name": "Debe introducir un valor para \"{{int:config-db-name}}\".", "config-missing-db-host": "Debe introducir un valor para \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Debe introducir un valor para \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "O TNS da base de datos, \"$1\", é incorrecto.\nUtilice só \"TNS Name\" ou unha cadea de texto \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm métodos de nomeamento de Oracle])", "config-invalid-db-name": "O nome da base de datos, \"$1\", é incorrecto.\nSó pode conter letras ASCII (a-z, A-Z), números (0-9), guións baixos (_) e guións (-).", "config-invalid-db-prefix": "O prefixo da base de datos, \"$1\", é incorrecto.\nSó pode conter letras ASCII (a-z, A-Z), números (0-9), guións baixos (_) e guións (-).", "config-connection-error": "$1.\n\nComprobe o servidor, nome de usuario e contrasinal que hai a continuación e inténteo de novo.", "config-invalid-schema": "O esquema de MediaWiki, \"$1\", é incorrecto.\nSó pode conter letras ASCII (a-z, A-Z), números (0-9) e guións baixos (_).", - "config-db-sys-create-oracle": "O programa de instalación soamente soporta o emprego de contas SYSDBA como método para crear unha nova conta.", - "config-db-sys-user-exists-oracle": "A conta de usuario \"$1\" xa existe. SYSDBA soamente se pode empregar para a creación dunha nova conta!", "config-postgres-old": "Necesítase PostgreSQL $1 ou posterior. Vostede ten a versión $2.", - "config-mssql-old": "Necesítase Microsoft SQL Server $1 ou posterior. Vostede ten a versión $2.", "config-sqlite-name-help": "Escolla un nome que identifique o seu wiki.\nNon utilice espazos ou guións.\nEste nome será utilizado para o ficheiro de datos SQLite.", "config-sqlite-parent-unwritable-group": "Non se puido crear o directorio de datos $1, porque o servidor web non pode escribir no directorio pai $2.\n\nO programa de instalación determinou o usuario que executa o seu servidor web.\nPara continuar, faga que se poida escribir no directorio $3.\nNun sistema Unix/Linux cómpre realizar:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Non se puido crear o directorio de datos $1, porque o servidor web non pode escribir no directorio pai $2.\n\nO programa de instalación non puido determinar o usuario que executa o seu servidor web.\nPara continuar, faga que se poida escribir globalmente no directorio $3.\nNun sistema Unix/Linux cómpre realizar:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -166,11 +149,6 @@ "config-mysql-engine": "Motor de almacenamento:", "config-mysql-innodb": "InnoDB (recomendado)", "config-mysql-engine-help": "InnoDB é case sempre a mellor opción, dado que soporta ben os accesos simultáneos.\n\nMyISAM é máis rápido en instalacións de usuario único e de só lectura.\nAs bases de datos MyISAM tenden a se corromper máis a miúdo ca as bases de datos InnoDB.", - "config-mssql-auth": "Tipo de autenticación:", - "config-mssql-install-auth": "Seleccione o tipo de autenticación que se utilizará para conectarse á base de datos durante o proceso de instalación.\nSe selecciona \"{{int:config-mssql-windowsauth}}\", usaranse as credenciais do usuario co que se está a executar o servidor web.", - "config-mssql-web-auth": "Seleccione o tipo de autenticación que utilizará o servidor web para conectarse ao servidor da base de datos durante o funcionamiento normal do wiki.\nSe selecciona \"{{int:config-mssql-windowsauth}}\", usaranse as credenciais do usuario co que se está a executar o servidor web.", - "config-mssql-sqlauth": "Autenticación de SQL Server", - "config-mssql-windowsauth": "Autenticación de Windows", "config-site-name": "Nome do wiki:", "config-site-name-help": "Isto aparecerá na barra de títulos do navegador e noutros lugares.", "config-site-name-blank": "Escriba o nome do sitio.", diff --git a/includes/installer/i18n/he.json b/includes/installer/i18n/he.json index 3a869cfa03..ba846e6511 100644 --- a/includes/installer/i18n/he.json +++ b/includes/installer/i18n/he.json @@ -95,13 +95,9 @@ "config-db-type": "סוג מסד הנתונים:", "config-db-host": "שרת מסד הנתונים:", "config-db-host-help": "אם שרת מסד הנתונים שלך נמצא על שרת אחר, יש להקליד את שם המחשב או את כתובת ה־IP כאן.\n\nאם זה אירוח משותף, ספק האירוח שלכם אמור לתת לך את שם השרת הנכון במסמכים.\n\nאם זוהי התקנה בשרת Windows שמשתמשת ב־MySQL, השימוש ב־localhost עשוי לא לעבוד. אם הוא לא עובד, יש לנסות את \"127.0.0.1\" בתור כתובת ה־IP המקומית.\n\nאם זה PostgreSQL, תשאירו את השדה הזה ריק כדי להתחבר דרך שקע יוניקס.", - "config-db-host-oracle": "TNS של מסד הנתונים:", - "config-db-host-oracle-help": "יש להקליד [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm שם חיבור מקומי (Local Connect Name)] תקין; הקובץ tnsnames.ora צריך להיות זמין להתקנה הזאת.
\nאם יש פה ב־client libraries 10g או בגרסה חדשה יותר, אפשר להשתמש גם בשיטת מתן השמות [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "זיהוי ויקי זה", "config-db-name": "שם מסד הנתונים (ללא מקף):", "config-db-name-help": "נא לבחור שם שמזהה את הוויקי שלכם.\nלא צריכים להיות בו רווחים.\n\nאם זהו משתמשים באירוח משותף, ספק האירוח שלכם ייתן לכם שם מסד נתונים מסוים שתוכלו להשתמש בו או יאפשר לכם ליצור מסד נתונים דרך לוח בקרה.", - "config-db-name-oracle": "סכמה של מסד נתונים:", - "config-db-account-oracle-warn": "קיימים שלושה תרחישים נתמכים עבור התקנת אורקל בתור מסד הנתונים:\n\nאם הרצונך ליצור חשבון מסד נתונים כחלק מתהליך ההתקנה, נא לספק חשבון בעל תפקיד SYSDBA בתור חשבון מסד הנתונים עבור ההתקנה ולציין את האישורים המבוקשים עבור חשבון הגישה לאינטרנט, אחרת ניתן ליצור באופן ידני את חשבון הגישה לאינטרנט, ולספק חשבון זה בלבד (אם יש לו ההרשאות הדרושות ליצירת עצמי סכמה) או לספק שני חשבונות שונים, אחד עם הרשאות יצירה ואחד מוגבלת עבור גישה לאינטרנט.\n\nסקריפט ליצירת חשבון עם ההרשאות הנדרשות ניתן למצוא בתיקייה \"maintenance/oracle/\" של ההתקנה זו. נא לזכור כי שימוש בחשבון מוגבל יגרום להשבתת כל יכולות תחזוקה עם חשבון בררת המחדל.", "config-db-install-account": "חשבון משתמש להתקנה", "config-db-username": "שם המשתמש במסד הנתונים:", "config-db-password": "הססמה במסד הנתונים:", @@ -120,34 +116,22 @@ "config-pg-test-error": "ההתחברות למסד הנתונים '''$1''' לא מצליחה: $2", "config-sqlite-dir": "תיקיית נתונים (data directory) של SQLite:", "config-sqlite-dir-help": "SQLite שומר את כל הנתונים בקובץ אחד.\n\nלשרת הווב צריכה להיות הרשאה לכתוב לתיקייה שמוגדרת כאן.\n\nהיא לא צריכה נגישה לכולם דרך האינטרנט – בגלל זה איננו שמים אותה באותו מקום עם קובצי ה־PHP.\n\nתוכנת ההתקנה תכתוב קובץ .htaccess יחד אִתו, אבל אם זה ייכשל, מישהו יוכל להשיג גישה למסד הנתונים שלכם.\nשם נמצא מידע מפורש של משתמשים (כתובות דוא״ל, ססמאות מגובבות) וגם גרסאות מחוקות של דפים ומידע מוגבל אחר.\n\nכדאי לשקול לשים את מסד הנתונים במקום אחר לגמרי, למשל ב־/var/lib/mediawiki/yourwik.", - "config-oracle-def-ts": "מרחב טבלאות לפי בררת מחדל (default tablespace):", - "config-oracle-temp-ts": "מרחב טבלאות זמני (temporary tablespace):", "config-type-mysql": "MariaDB‏, MySQL, או תואם", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "מדיה־ויקי תומכת במערכות מסדי הנתונים הבאות:\n\n$1\n\nאם אינך רואה את מסד הנתונים שלך ברשימה, יש לעקוב אחר ההוראות המקושרות לעיל כדי להפעיל את התמיכה.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] הוא היעד העיקרי עבור מדיה־ויקי ולו התמיכה הטובה ביותר. מדיה־ויקי עובדת גם עם [{{int:version-db-mysql-url}} MySQL] ועם [{{int:version-db-percona-url}} Percona Server], שתואמים ל־MariaDB. (ר׳ [https://www.php.net/manual/en/mysql.installation.php how to compile PHP with MySQL support])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] הוא מסד נתונים נפוץ בקוד פתוח והוא נפוץ בתור חלופה ל־MySQL. (ר׳ [https://www.php.net/manual/en/pgsql.installation.php how to compile PHP with PostgreSQL support]).", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] הוא מסד נתונים קליל עם תמיכה טובה מאוד. (ר׳ [https://www.php.net/manual/en/pdo.installation.php How to compile PHP with SQLite support], משתמש ב־PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] הוא מסד נתונים עסקי מסחרי. (ר׳ [https://www.php.net/manual/en/oci8.installation.php How to compile PHP with OCI8 support])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] הוא מסד נתונים עסקי מסחרי לחלונות. ([https://www.php.net/manual/en/sqlsrv.installation.php How to compile PHP with SQLSRV support])", "config-header-mysql": "הגדרות MariaDB/MySQL", "config-header-postgres": "הגדרות PostgreSQL", "config-header-sqlite": "הגדרות SQLite", - "config-header-oracle": "הגדרות Oracle", - "config-header-mssql": "הגדרות Microsoft SQL Server", "config-invalid-db-type": "סוג מסד הנתונים שגוי", "config-missing-db-name": "יש להזין ערך עבור \"{{int:config-db-name}}\".", "config-missing-db-host": "יש להכניס ערך לשדה \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "יש להכניס ערך לשדה \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "\"$1\" הוא TNS מסד־נתונים בלתי־‏תקין.\nיש להשתמש ב־\"TNS name\" או במחרוזת \"Easy Connect\" (ר' [http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods])", "config-invalid-db-name": "\"$1\" הוא שם מסד נתונים בלתי־תקין.\nיש להשתמש רק באותיות ASCII‏ (a עד z‏, A עד Z), סְפָרוֹת (0 עד 9), קווים תחתיים (_) ומינוסים (-).", "config-invalid-db-prefix": "\"$1\" היא תחילית מסד נתונים בלתי תקינה.\nיש להשתמש רק באותיות ASCII‏ (a עד z‏, A עד Z), סְפָרוֹת (0 עד 9), קווים תחתיים (_) ומינוסים (-).", "config-connection-error": "
$1.
\n\nיש לבדוק את שם השרת, את שם המשתמש ואת הססמה בטופס להלן ולנסות שוב.", "config-invalid-schema": "\"$1\" היא סכמה לא תקינה עבור מדיה־ויקי.\nיש להשתמש רק באותיות ASCII‏ (a עד z‏, A עד Z), סְפָרוֹת (0 עד 9) וקווים תחתיים (_).", - "config-db-sys-create-oracle": "תוכנית ההתקנה תומכת רק בשימוש בחשבון SYSDBA ליצירת חשבון חדש.", - "config-db-sys-user-exists-oracle": "חשבון המשתמש \"$1\" כבר קיים. SYSDBA יכול לשמש רק ליצירת חשבון חדש!", "config-postgres-old": "נדרש PostgreSQL $1 או גרסה חדשה יותר, הגרסה הנוכחית שלכם היא $2.", - "config-mssql-old": "חובה להשתמש ב־Microsoft SQL Server מגרסה $1 או גרסה חדשה יותר. הגרסה שלך היא $2.", "config-sqlite-name-help": "יש לבחור בשם שמזהה את הוויקי שלכם.\nאין להשתמש ברווחים או במינוסים.\nזה יהיה שם קובץ הנתונים ל־SQLite.", "config-sqlite-parent-unwritable-group": "לא ניתן ליצור את תיקיית הנתונים $1, כי לשָׁרַת הווב אין הרשאות לכתוב לתיקיית האם $2 .\n\nתוכנת ההתקנה זיהתה את החשבון שתחתיו רץ שרת הווב שלכם.\nיש לאפשר לשָׁרַת הווב לכתוב לתיקייה $3.\nבמערכת Unix/Linux יש לכתוב:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "לא ניתן ליצור את תיקיית הנתונים $1, כי לשָׁרַת הווב אין הרשאות לכתוב לתיקיית האם $2.\n\nתוכנת ההתקנה לא זיהתה את החשבון שתחתיו רץ שרת הווב שלכם.\nיש לאפשר לכל החשבונות לכתוב לתיקייה $3 כדי להמשיך.\nבמערכת Unix/Linux יש לכתוב:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -171,11 +155,6 @@ "config-mysql-engine": "מנוע האחסון:", "config-mysql-innodb": "InnoDB (מומלץ)", "config-mysql-engine-help": "'''InnoDB''' היא כמעט תמיד האפשרות הטובה ביותר, כי במנוע הזה יש תמיכה טובה ביותר בעיבוד מקבילי.\n\n'''MyISAM''' עשוי להיות בהתקנות שמיועדות למשתמש אחד ולהתקנות לקריאה בלבד.\nמסדי נתונים עם MyISAM נוטים להיהרס לעתים קרובות יותר מאשר מסדי נתונים עם InnoDB.", - "config-mssql-auth": "סוג אימות:", - "config-mssql-install-auth": "נא לבחור את סוג האימות שישמש להתחברות למסד הנתונים בזמן תהליך ההתקנה. בחירה ב־\"{{int:config-mssql-windowsauth}}\" תשתמש בהרשאות של החשבון שמריץ את השרת הנוכחי.", - "config-mssql-web-auth": "נא לבחור את סוג האימות שישמש את השרת להתחברות למסד הנתונים בזמן הריצה הרגילה של הוויקי.\nבחירה ב־\"{{int:config-mssql-windowsauth}}\" תשתמש בהרשאות של החשבון שמריץ את השרת הנוכחי.", - "config-mssql-sqlauth": "SQL Server Authentication", - "config-mssql-windowsauth": "Windows Authentication", "config-site-name": "שם הוויקי:", "config-site-name-help": "זה יופיע בשורת הכותרת של הדפדפן ובמקומות רבים אחרים.", "config-site-name-blank": "נא להזין שם לאתר.", diff --git a/includes/installer/i18n/hi.json b/includes/installer/i18n/hi.json index 90b11a9cbb..9141611221 100644 --- a/includes/installer/i18n/hi.json +++ b/includes/installer/i18n/hi.json @@ -53,20 +53,16 @@ "config-using-32bit": "<विशेष>चेतावनी: आपका सिस्टम 32-बिट पूर्णांक के साथ चल रहा है यह [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:32-bit विवेचित नहीं है]।", "config-db-type": "डेटाबेस प्रकार:", "config-db-host": "डेटाबेस होस्ट:", - "config-db-host-oracle": "डेटाबेस टीएनएस:", "config-db-wiki-settings": "इस विकि को पहचानें", "config-db-name": "डेटाबेस का नाम:", "config-db-install-account": "इसे स्थापित करने हेतु सदस्य खाता", "config-db-username": "डेटाबेस सदस्यनाम:", "config-db-password": "डेटाबेस पासवर्ड:", "config-db-port": "डेटाबेस पोर्ट:", - "config-type-mssql": "माइक्रोसॉफ़्ट एसक्यूएल सर्वर", "config-invalid-db-type": "अमान्य डेटाबेस प्रकार", "config-regenerate": "LocalSettings.php फिर से निर्मित करें →", "config-db-web-account": "वेब पहुँच हेतु डेटाबेस खाता", "config-mysql-innodb": "इनोडीबी", - "config-mssql-auth": "प्रमाणन प्रकार:", - "config-mssql-sqlauth": "SQL सर्वर प्रमाणन", "config-site-name": "विकि का नाम:", "config-site-name-blank": "एक साइट का नाम लिखें", "config-project-namespace": "प्रकल्प नामस्थान:", diff --git a/includes/installer/i18n/hrx.json b/includes/installer/i18n/hrx.json index 191460076c..5aeb9d9ec3 100644 --- a/includes/installer/i18n/hrx.json +++ b/includes/installer/i18n/hrx.json @@ -77,13 +77,9 @@ "config-db-type": "Datebanksystem:", "config-db-host": "Datebankserver:", "config-db-host-help": "Soweit sich die Datebank uff en annre Server befindt, ist hier der Servernoome orrer die entsprechende IP-Adresse oonzugewe.\n\nSoweit en gemeinschaftlich genutzter Server verwendt weard, sollt der Hoster den zutreffend Servernoomen in seiner Dokumentation oongeb hoon.\n\nSoweit uff enem Windows-Server installiert und MySQL genutzt weard, funktioniert der Servername „localhost“ voaraussichtlich net. Wenn net, sollte „127.0.0.1“ orrer die lokale IP-Adress oongeb sin.\n\nSoweit PostgresQL benutzt weard, muss das Feld/Campo leer geloss sin, um üwer en Unix-Socket zu verbinne.", - "config-db-host-oracle": "Datebank-TNS:", - "config-db-host-oracle-help": "En gültiche [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm „Local Connect“-Namen] angeben. Die „tnsnames.ora“-Datei muss von die Installation erkannt werre könne.
Sofern die Client-Bibliotheke für Version 10g orrer neier verwennet weare, kann ooch [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm „Easy Connect“] zu der Noomensgebung benutzt sin.", "config-db-wiki-settings": "Bitte Date zu der indeitiche Identifikatio von das Wiki oongewe", "config-db-name": "Datebanksystem:", "config-db-name-help": "Bitte en Noome oongewe, mit dem das Wiki identifiziert werre kann.\nDobei sollt ken Leerzeiche verwennet sin.\n\nSoweit en gemeinschaftlich genutzter Server verwennet weard, sollt der Hoster den Datebanknoome oongegewe orrer awer die Erstellung von en Datebank üwer en entsprechendes Interface gestattet hoon.", - "config-db-name-oracle": "Datebankschema:", - "config-db-account-oracle-warn": "Es gebt drei von MediaWiki unnerstützte Möchlichkeite Oracle als Datebank inzurichte:\n\nSoweit das Datebankbenutzerkonto im Moment (während des) von dem Installationsvoargang erstellt werre soll, muss en Datebankbenutzerkonto mit der SYSDBA-Berechtichung zusammer mit den entsprechende Onnmeldeinformatione oongeb sin, mit dem dann üwer das Web uff die Datebank zugegriff sin kann. Alternativ kann man ooch ledichlich en enzelnes manuell oongelechtes Datebankbenutzerkonto oongewe, mit dem üwer das Web uff die Datebank zugegriff werre kann, soweit das üwer die Berechtichung zur Erstellung von Datebankscheme verfücht. Zudem ist es möchlich zwooi Datebankbenutzerkonte oonzugew von dene enes die Berechtichung zu der Erstellung von Datebankscheme hot und das annere, um mit ihm üwer das Web uff die Datebank zuzugreife.\n\nEn Skript zu dem Oonlehn von en Datebankbenutzerkonto mit den notwendiche Berechtichunge findt man unner dem Pad „…/maintenance/oracle/“ von der MediaWiki-Installation. Das ist dobei zu bedenke, dass die Verwennung von en Datebankbenutzerkonto mit beschränkte Berechtichunge die Nutzung von der Wartungsfunktione für das Standarddatebankbenutzerkonto deaktiviert.", "config-db-install-account": "Benutzerkonto für die Installation", "config-db-username": "Der Datebankbenutzer sein Noome:", "config-db-password": "Der Datebankbenutzer sei Passwort:", @@ -102,34 +98,22 @@ "config-pg-test-error": "Do kann ken Verbinnung zur Datebank '''$1''' heargestellt sin: $2", "config-sqlite-dir": "SQLite-Dateverzeichnis:", "config-sqlite-dir-help": "SQLite speichert alle Date in en enziche Datei.\n\nDas für sie voargesiehn Verzeichnis muss (während des) im Momento von dem Installationsvoargang beschreibbar orrer beschrib fähich sin.\n\nDas sollt '''net''' üwer das Web zugänglich sin, was der Grund ist, warum die Datei net dort abgeleht weard, wo sich die PHP-Dateie befinne.\n\nDas Installationsprogramm weard mit der Datei zusammer en zusätzliche .htaccess-Datei erstelle. Soweit das scheitert, könne Dritte uff die Datedatei zugreife.\nDas umfasst die Nutzerdate (E-Mail-Adresse, Passwörter, und so weiter) wie ooch gelöschte Seiteversione und annere vertrauliche Date, die im Wiki gespeichert sind.\n\nTue konsideriere, erwäch die Datedatei an en gänz anner Platz abzulehn, zum beispiel im Verzeichnis ./var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Standardtabelleraum:", - "config-oracle-temp-ts": "Temporärer Tabelleraum:", "config-type-mysql": "MySQL (orrer kompatible Datebanksysteme)", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki unnerstützt die follichenne Datebanksysteme:\n\n$1\n\nSoweit net das Datebanksystem oongezeicht weard, das verwennt werre soll, gebt das uwe en Link zu der Oonleitung mit Informatione, wie das aktiviert sin kann.", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] ist das von MediaWiki primär unterstützte Datebanksystem. MediaWiki funktioniert ooch mit [{{int:version-db-mariadb-url}} MariaDB] und [{{int:version-db-percona-url}} Percona Server], die MySQL-kompatibel sind. ([https://www.php.net/manual/en/mysqli.installation.php Oonleitung zur Kompilierung von PHP mit MySQL-Unnerstützung] [englisch Sproch])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] ist en beliebtes Open-Source-Datebanksystem und ein Alternativ zu MySQL. Es gibt awer enche klenre Implementierungsfehler, so dass von der Nutzung in ener Produktivumgebung abgerat weard. ([https://www.php.net/manual/en/pgsql.installation.php Oonnleitung zur Kompilierung von PHP mit PostgreSQL-Unterstützung])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] ist en verschlanktes Datebanksystem, das ooch gut unnerstützt weard ([http://www.php.net/manual/de/pdo.installation.php Oonleitung zur Kompilierung von PHP mit SQLite-Unterstützung], verwennt PHP Data Objects (PDO))", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] ist en kommerzielle Unnernehmensdatebank ([http://www.php.net/manual/en/oci8.installation.php Oonleitung zur Kompilierung von PHP mit OCI8-Unnerstützung (en)])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] ist en gewerbliche Unnernehmensdatebank für Windows. ([Config-dbsupport-oracle/manual/de/sqlsrv.installation.php Oonleitung zur Kompilierung von PHP mithilfe SQLSRV-Unnerstützung])", "config-header-mysql": "MySQL-Instellunge", "config-header-postgres": "PostgreSQL-Instellunge", "config-header-sqlite": "SQLite-Instellunge", - "config-header-oracle": "Oracle-Instellunge", - "config-header-mssql": "Instellunge von Microsoft SQL Server", "config-invalid-db-type": "Unzulässiges Datebanksystem", "config-missing-db-name": "Bei \"{{int:config-db-name}}\" muss en Weart oongeb sin.", "config-missing-db-host": "Bei \"{{int:config-db-host}}\" muss en Weart oongeb sin.", - "config-missing-db-server-oracle": "Für das \"{{int:config-db-host-oracle}}\" muss en Weart ingeb sin.", - "config-invalid-db-server-oracle": "Ungültiches Datebank-TNS „$1“.\nEntweder „TNS Noome“ orrer ene „Easy Connect“-Zeichefolliche verwenne ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle-Benennungsmethode])", "config-invalid-db-name": "Ungülticher Datebankname „$1“.\nDo deerfe nuar ASCII-codierte Buchstoobe (a-z, A-Z), Zooahle (0-9), Unner- (_) sowie Binnestriche (-) verwennt sin.", "config-invalid-db-prefix": "Ungülticher Datebanktabellepräfix „$1“.\nEs dürfe nuar ASCII-codierte Buchstoobe (a-z, A-Z), Zoohle (0-9), Unner- (_) sowie Binnestriche (-) verwennt sin.", "config-connection-error": "$1.\n\nBitte unne oongeb Servernoome, Benutzernoome sowie das Passwort üwerprüfe und es dann erneit versuche.", "config-invalid-schema": "Ungültiches Dateschema für MediaWiki „$1“.\nEs dürfe nuar ASCII-codierte Buchstoobe (a-z, A-Z), Zoohle (0-9) und Unnerstriche (_) verwennt sin.", - "config-db-sys-create-oracle": "Das Installationsprogramm unnerstützt nuar die Verwennung von en Datebankbenutzerkonto mit SYSDBA-Berechtichung zum oonlehn von en neie Datebankbenutzerkonto.", - "config-db-sys-user-exists-oracle": "Das Datebankbenutzerkonto „$1“ ist schoon voarhand. En Datebankbenutzerkontos mit SYSDBA-Berechtichung kann nuar zum oonlehn von en neie Datebankbenutzerkonto benutzt sin.", "config-postgres-old": "MySQL $1 orrer höcher weard benöticht. MySQL $2 ist momentan voarhand.", - "config-mssql-old": "Es weard Microsoft SQL Server $1 orrer später benöticht. Dein Version ist $2.", "config-sqlite-name-help": "Bitte en Noome oongewe, mit dem das Wiki identifiziert werre kann.\nDobei bitte ken Leerzeiche orrer Binnestriche verwenne.\nDer Noome weard für die SQLite-Datedateinoome benutzt.", "config-sqlite-parent-unwritable-group": "Das Dateverzeichnis $1 kann net erzeicht werre, weil das üwergeoordnete Verzeichnis $2 net für den Webserver beschreibbar ist.\n\nDas Installationsprogramm konnt den Benutzer bestimme, mit dem Webserver ausgeführt weard.\nSchreibzugriff uff das $3-Verzeichnis muss für den ermöglicht werre, so das den Installationsvoargang fortgesetz sin kann.\n\nUff enem Unix- orrer Linux-System:\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Das Dateverzeichnis $1 kann net erzeicht sin, weil das üwergeordnete Verzeichnis $2 net für den Webserver beschreibbar ist.\n\nDas Installationsprogramm konnt den Benutzer bestimmen, mit dem Webserver ausgeführt weard.\nSchreibzugriff uff das $3-Verzeichnis muss global für den und annre Benutzer ermöglicht sin, so das den Installationsvoargang fortgesetzt sin kann.\n\nUff enem Unix- orrer Linux-System:\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -153,11 +137,6 @@ "config-mysql-engine": "Speicher-Engine:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "'''InnoDB''' ist nächst immer die bessre Wähl, weil es gleichzeitiche Zugriffe gut unnerstützt.\n\n'''MyISAM''' ist in Enzelnutzerumgebunge sowie bei schreibgeschützte Wikis schneller.\nBei MyISAM-Datebanke treten tendenziell häuficher Fehler uff als bei InnoDB-Datebanke.", - "config-mssql-auth": "Authentifikationstyp:", - "config-mssql-install-auth": "Wähl den Authentifikationstyp aus, der zur Verbinnung mit der Datebank während von der Installationsprozesses verwennt weard.\nFalls du „{{int:config-mssql-windowsauth}}“ auswählst, werre die Oonmeldeinformatione von en beliebiche Benutzer verwennt, wo den Webserver ausführt.", - "config-mssql-web-auth": "Wähl den Authentifikationstyp aus, der vom Webserver zur Verbinnung mit dem Datebankserver während / im Verloof von der gewöhnliche Betrieb von der Wiki verwennt weard.\nFalls du „{{int:config-mssql-windowsauth}}“ auswählst, werre die Oonmeldeinformatione von en beliebiche Benutzer verwennt, wo den Webserver ausführt.", - "config-mssql-sqlauth": "SQL-Server-Authentifikation", - "config-mssql-windowsauth": "Windows-Authentifikation", "config-site-name": "Der Wiki sein Noome:", "config-site-name-help": "Er weard in der Titelleiste von der Browser, wie ooch verschiedne annre Stelle, benutzt.", "config-site-name-blank": "Der Wiki sein Noome oongewe.", diff --git a/includes/installer/i18n/hsb.json b/includes/installer/i18n/hsb.json index 5a5f109263..59f56b5fd9 100644 --- a/includes/installer/i18n/hsb.json +++ b/includes/installer/i18n/hsb.json @@ -62,10 +62,8 @@ "config-using-uri": "Serwerowy URL \"$1$2\" so wužiwa.", "config-db-type": "Typ datoweje banki:", "config-db-host": "Serwer datoweje banki:", - "config-db-host-oracle": "Datowa banka TNS:", "config-db-wiki-settings": "Tutón wiki identifikować", "config-db-name": "Mjeno datoweje banki:", - "config-db-name-oracle": "Šema datoweje banki:", "config-db-install-account": "Wužiwarske konto za instalaciju", "config-db-username": "Wužiwarske mjeno datoweje banki:", "config-db-password": "Hesło datoweje banki:", @@ -81,30 +79,21 @@ "config-db-schema-help": "Tuta šema da so zwjetša derje wužiwać.\nZměń ju jenož, jeli su přeswědčiwe přičiny za to.", "config-pg-test-error": "Zwisk z datowej banku '''$1''' móžno njeje: $2", "config-sqlite-dir": "Zapis SQLite-datow:", - "config-oracle-def-ts": "Standardny tabelowy rum:", - "config-oracle-temp-ts": "Nachwilny tabelowy rum:", "config-type-mysql": "MySQL (abo kompatibelny)", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] je primarny cil za MediaWiki a podpěruje so najlěpje. MediaWiki funguje tež z [{{int:version-db-mariadb-url}} MariaDB] a [{{int:version-db-percona-url}} Percona Server], kotrejž stej kompatibelnej z MySQL. ([https://www.php.net/manual/en/mysqli.installation.php Nawod ke kompilowanju PHP z MySQL-podpěru])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] je popularny system datoweje banki zjawneho žórła jako alternatiwa k MySQL. Móhło hišće někotre zmylki eksistować, a njeporuča so jón w produktiwnej wokolinje wužiwać. ([https://www.php.net/manual/en/pgsql.installation.php Nawod za kompilowanje PHP z podpěru PostgreSQL])", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] je komercielna předewzaćelska datowa banka. ([http://www.php.net/manual/en/oci8.installation.php Nawod za kompilowanje PHP z OCI8-podpěru])", "config-header-mysql": "Nastajenja MySQL", "config-header-postgres": "Nastajenja PostgreSQL", "config-header-sqlite": "Nastajenja SQLite", - "config-header-oracle": "Nastajenja Oracle", "config-invalid-db-type": "Njepłaćiwy typ datoweje banki", "config-missing-db-name": "Dyrbiš hódnotu za \"Mjeno datoweje banki\" zapodać", "config-missing-db-host": "Dyrbiš hódnotu za \"Database host\" zapodać", - "config-missing-db-server-oracle": "Dyrbiš hódnotu za \"Database TNS\" zapodać", - "config-invalid-db-server-oracle": "Njepłaćiwa datowa banka TNS \"$1\".\nWužij pak \"TNS Name\" pak znamješkowy rjećazk \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle - pomjenowanske metody])", "config-invalid-db-name": "Njepłaćiwe mjeno \"$1\" datoweje banki.\nWužij jenož pismiki ASCII (a-z, A-Z), ličby (0-9),a podsmužki (_) a wjazawki (-).", "config-invalid-db-prefix": "Njepłaćiwy prefiks \"$1\" datoweje banki.\nWužij jenož pismiki ASCII (a-z, A-Z), ličby (0-9), podsmužki (_) a wjazawki (-).", "config-connection-error": "$1.\n\nSkontroluj serwer, wužiwarske a hesło a spytaj hišće raz.", "config-invalid-schema": "Njepłaćiwe šema za MediaWiki \"$1\".\nWužij jenož pismiki ASCII (a-z, A-Z), ličby (0-9) a podsmužki (_).", - "config-db-sys-create-oracle": "Instalaciski program podpěruje jenož wužiwanje SYSDBA-konta za zakoženje noweho konta.", - "config-db-sys-user-exists-oracle": "Wužiwarske konto \"$1\" hižo eksistuje. SYSDBA hodźi so jenož za załoženje noweho konta wužiwać!", "config-postgres-old": "PostgreSQL $1 abo nowši trěbny, maš $2.", "config-sqlite-name-help": "Wubjer mjeno, kotrež twój wiki identifikuje.\nNjewužij mjezery abo wjazawki.\nTo budźe so za mjeno dataje SQLite-datow wužiwać.", "config-sqlite-mkdir-error": "Zmylk při wutworjenju datoweho zapisa \"$1\".\nSkontroluj městno a spytaj hišće raz.", diff --git a/includes/installer/i18n/hu.json b/includes/installer/i18n/hu.json index fed6854585..9226e61667 100644 --- a/includes/installer/i18n/hu.json +++ b/includes/installer/i18n/hu.json @@ -89,12 +89,9 @@ "config-db-type": "Adatbázis típusa:", "config-db-host": "Adatbázis hosztneve:", "config-db-host-help": "Ha az adatbázisszerver másik szerveren található, add meg a hosztnevét vagy az IP-címét.\n\nHa megosztott webtárhelyet használsz, a szolgáltató dokumentációjában megtalálható a helyes hosztnév.\n\nHa Windows-alapú szerverre telepítesz, és MySQL-t használsz, a „localhost” nem biztos, hogy működni fog. Ha így van, próbáld meg a „127.0.0.1” helyi IP-cím használatát.\n\nHa PostgreSQL-t használsz, hagyd ezt a mezőt üresen a Unix-socketon keresztül történő csatlakozáshoz.", - "config-db-host-oracle": "Adatbázis TNS:", "config-db-wiki-settings": "A wiki azonosítása", "config-db-name": "Adatbázisnév:", "config-db-name-help": "Válassz egy nevet a wiki azonosítására.\nNe tartalmazzon szóközt.\n\nHa megosztott webtárhelyet használsz, a szolgáltatód vagy megadja a használandó adatbázisnevet, vagy te magad hozhatsz létre adatbázisokat egy vezérlőpulton keresztül.", - "config-db-name-oracle": "Adatbázisséma:", - "config-db-account-oracle-warn": "Oracle adatbázisba való telepítésnek három támogatott módja van:\n\nHa a telepítési folyamat során adatbázisfiókot szeretnél létrehozni, akkor egy olyan fiókot kell használnod, mely rendelkezik SYSDBA jogosultsággal, majd meg kell adnod a létrehozandó, webes hozzáféréshez használt fiók adatait. Emellett a fiók kézzel is létrehozható, ekkor ennek az adatait kell megadni (a fióknak rendelkeznie kell megfelelő jogosul adatbázis-objektumok létrehozásához), vagy megadhatsz két fiókot: egyet a létrehozáshoz szükséges jogosultságokkal, és egy korlátozottat a webes hozzáféréshez.\n\nA megfelelő jogosultságokkal rendelkező fiók létrehozásához használható szkript a szoftver „maintenance/oracle/” könyvtárában található. Ne feledd, hogy korlátozott fiók használatakor az alapértelmezett fiókkal nem végezhetőek el a karbantartási műveletek.", "config-db-install-account": "A telepítéshez használt felhasználói fiók adatai", "config-db-username": "Adatbázis-felhasználónév:", "config-db-password": "Adatbázisjelszó:", @@ -113,34 +110,22 @@ "config-pg-test-error": "Nem sikerült csatlakozni a(z) '''$1''' adatbázishoz: $2", "config-sqlite-dir": "SQLite-adatkönyvtár:", "config-sqlite-dir-help": "Az SQLite minden adatot egyetlen fájlban tárol.\n\nA megadott könyvtárban írási jogosultsággal kell rendelkeznie a webszervernek.\n\n'''Nem''' szabad elérhetőnek lennie weben keresztül, ezért nem rakjuk oda, ahol a PHP-fájljaid vannak.\n\nA telepítő készít egy .htaccess fájlt az adatbázis mellé, azonban ha valamilyen okból nem sikerül, akkor akárki hozzáférhet a teljes adatbázisodhoz. Ez a felhasználók adatai (e-mail címek, jelszók hashei) mellett a törölt változatokat és más, korlátozott hozzáférésű információkat is tartalmaz.\n\nFontold meg az adatbázis más helyre történő elhelyezését, például a /var/lib/mediawiki/tewikid könyvtárba.", - "config-oracle-def-ts": "Alapértelmezett táblatér:", - "config-oracle-temp-ts": "Ideiglenes táblatér:", "config-type-mysql": "MySQL (vagy kompatibilis)", - "config-type-mssql": "Microsoft SQL Szerver", "config-support-info": "A MediaWiki a következő adatbázisrendszereket támogatja:\n\n$1\n\nHa az alábbi listán nem találod azt a rendszert, melyet használni szeretnél, a fenti linken található instrukciókat követve engedélyezheted a támogatását.", "config-dbsupport-mysql": "* A [{{int:version-db-mysql-url}} MySQL] a MediaWiki elsődleges célpontja, így a legjobban támogatott. A MediaWiki elfut [{{int:version-db-mariadb-url}} MariaDB-n] és [{{int:version-db-percona-url}} Percona Serveren] is, mivel ezek MySQL-kompatibilisek. ([https://www.php.net/manual/en/mysql.installation.php Hogyan fordítható a PHP MySQL-támogatással])", "config-dbsupport-postgres": "* A [{{int:version-db-postgres-url}} PostgreSQL] népszerű, nyílt forráskódú adatbázisrendszer, a MySQL alternatívája. ([https://www.php.net/manual/en/pgsql.installation.php Hogyan fordítható a PHP PostgreSQL-támogatással])", "config-dbsupport-sqlite": "* Az [{{int:version-db-sqlite-url}} SQLite] egy könnyű, nagyon jól támogatott adatbázisrendszer. ([http://www.php.net/manual/en/pdo.installation.php Hogyan fordítható a PHP SQLite-támogatással], PDO-t használ)", - "config-dbsupport-oracle": "* Az [{{int:version-db-oracle-url}} Oracle] kereskedelmi, vállalati adatbázisrendszer. ([http://www.php.net/manual/en/oci8.installation.php Hogyan fordítható a PHP OCI8-támogatással])", - "config-dbsupport-mssql": "* A [{{int:version-db-mssql-url}} Microsoft SQL Server] kereskedelmi, vállalati adatbázisrendszer. ([https://www.php.net/manual/en/sqlsrv.installation.php Hogyan fordítható a PHP SQLSRV-támogatással])", "config-header-mysql": "MySQL-beállítások", "config-header-postgres": "PostgreSQL-beállítások", "config-header-sqlite": "SQLite-beállítások", - "config-header-oracle": "Oracle-beállítások", - "config-header-mssql": "Microsoft SQL Server beállítások", "config-invalid-db-type": "Érvénytelen adatbázistípus", "config-missing-db-name": "Meg kell adnod a(z) „{{int:config-db-name}}” értékét.", "config-missing-db-host": "Meg kell adnod az „{{int:config-db-host}}” értékét.", - "config-missing-db-server-oracle": "Meg kell adnod az „{{int:config-db-host-oracle}}” értékét.", - "config-invalid-db-server-oracle": "Érvénytelen adatbázis TNS: „$1”\nHasználd a „TNS Name” vagy az Easy Connect” sztringet!\n([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods]).", "config-invalid-db-name": "Érvénytelen adatbázisnév: „$1”.\nCsak ASCII-karakterek (a-z, A-Z), számok (0-9), alulvonás (_) és kötőjel (-) használható.", "config-invalid-db-prefix": "Érvénytelen adatbázisnév-előtag: „$1”.\nCsak ASCII-karakterek (a-z, A-Z), számok (0-9), alulvonás (_) és kötőjel (-) használható.", "config-connection-error": "$1.\n\nEllenőrizd a hosztot, felhasználónevet és jelszót, majd próbáld újra.", "config-invalid-schema": "Érvénytelen MediaWiki-séma: „$1”.\nCsak ASCII-karakterek (a-z, A-Z), számok (0-9) és alulvonás (_) használható.", - "config-db-sys-create-oracle": "A telepítő csak a SYSDBA fiókkal tud új felhasználói fiókot létrehozni.", - "config-db-sys-user-exists-oracle": "Már létezik „$1” nevű felhasználói fiók. A SYSDBA csak új fiók létrehozására használható!", "config-postgres-old": "A PostgreSQL $1 vagy újabb verziója szükséges, a rendszeren $2 van.", - "config-mssql-old": "Microsoft SQL Server $1 vagy későbbi szükséges. Te verziód: $2.", "config-sqlite-name-help": "Válassz egy nevet a wiki azonosítására.\nNe tartalmazzon szóközt vagy kötőjelet.\nEz lesz az SQLite-adatfájl neve.", "config-sqlite-parent-unwritable-group": "Nem hozható létre a(z) $1 adatkönyvtár, mert a szülőkönyvtárba ($2) nem írhat a webszerver.\n\nA telepítő megállapította, hogy mely felhasználó futtatja a webszervert.\nA folytatáshoz tedd írhatóvá a(z) $3 könyvtárat.\nUnix/Linux rendszeren tedd a következőt:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Nem lehet létrehozni az adatok tárolásához szükséges $1 könyvtárat, mert a webszerver nem írhat a szülőkönyvtárba ($2).\n\nA telepítő nem tudta megállapíteni, hogy melyik felhasználói fiókon fut a webszerver.\nA folytatáshoz tedd írhatóvá ezen fiók (és más fiókok!) számára a következő könyvtárat: $3.\nUnix/Linux rendszereken tedd a következőt:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -164,9 +149,6 @@ "config-mysql-engine": "Tárolómotor:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "A legtöbb esetben az '''InnoDB''' a legjobb választás, mivel megfelelően támogatja a párhuzamosságot.\n\nA '''MyISAM''' gyorsabb megoldás lehet egyfelhasználós vagy csak olvasható környezetekben, azonban a MyISAM-adatbázisok sokkal gyakrabban sérülnek meg, mint az InnoDB-adatbázisok.", - "config-mssql-auth": "Hitelesítés típusa:", - "config-mssql-sqlauth": "SQL Server hitelesítés", - "config-mssql-windowsauth": "Windows hitelesítés", "config-site-name": "A wiki neve:", "config-site-name-help": "A böngésző címsorában és még számos más helyen jelenik meg.", "config-site-name-blank": "Add meg az oldal nevét.", diff --git a/includes/installer/i18n/ia.json b/includes/installer/i18n/ia.json index 9e08055514..eae79b0402 100644 --- a/includes/installer/i18n/ia.json +++ b/includes/installer/i18n/ia.json @@ -84,13 +84,9 @@ "config-db-type": "Typo de base de datos:", "config-db-host": "Servitor de base de datos:", "config-db-host-help": "Si tu servitor de base de datos es in un altere servitor, entra hic le nomine o adresse IP del servitor.\n\nSi tu usa un servitor web usate in commun, tu providitor deberea dar te le correcte nomine de servitor in su documentation.\n\nSi tu usa MySQL, le nomine \"localhost\" possibilemente non functiona como nomine de servitor. In tal caso, essaya \"127.0.0.1\", i.e. le adresse IP local.\n\nSi tu usa PostgreSQL, lassa iste campo vacue pro connecter via un \"socket\" de Unix.", - "config-db-host-oracle": "TNS del base de datos:", - "config-db-host-oracle-help": "Entra un [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm nomine Local Connect] valide; un file tnsnames.ora debe esser visibile a iste installation.
Si tu usa bibliothecas de cliente 10g o plus recente, tu pote anque usar le methodo de nomination [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identificar iste wiki", "config-db-name": "Nomine del base de datos (sin tractos de union):", "config-db-name-help": "Selige un nomine que identifica tu wiki.\nIllo non pote continer spatios.\n\nSi tu usa un servitor web usate in commun, tu providitor te fornira le nomine specific de un base de datos a usar, o te permitte crear un base de datos via un pannello de controlo.", - "config-db-name-oracle": "Schema del base de datos:", - "config-db-account-oracle-warn": "Il ha tres scenarios supportate pro le installation de Oracle como le base de datos de iste systema:\n\nSi tu vole crear un conto del base de datos como parte del processo de installation, per favor specifica un conto con le rolo SYSDBA como le conto del base de datos pro installation, e specifica le nomine e contrasigno desirate pro le conto de accesso per web. Alteremente tu pote crear le conto de accesso per web manualmente e specificar solmente iste conto (si illo ha le permissiones requisite pro crear le objectos de schema) o specifica duo contos differente, un con privilegios de creation e un conto restringite pro accesso per web.\n\nUn script pro crear un conto con le privilegios requisite se trova in le directorio \"maintenance/oracle/\" de iste installation. Non oblida que le uso de un conto restringite disactiva tote le capacitates de mantenentia in le conto predefinite.", "config-db-install-account": "Conto de usator pro installation", "config-db-username": "Nomine de usator del base de datos:", "config-db-password": "Contrasigno del base de datos:", @@ -109,37 +105,24 @@ "config-pg-test-error": "Impossibile connecter al base de datos '''$1''': $2", "config-sqlite-dir": "Directorio pro le datos de SQLite:", "config-sqlite-dir-help": "SQLite immagazina tote le datos in un sol file.\n\nLe directorio que tu forni debe permitter le accesso de scriptura al servitor web durante le installation.\n\nIllo '''non''' debe esser accessibile via web. Pro isto, nos non lo pone ubi tu files PHP es.\n\nLe installator scribera un file .htaccess insimul a illo, ma si isto falli, alcuno pote ganiar accesso directe a tu base de datos.\nIsto include le crude datos de usator (adresses de e-mail, contrasignos codificate) assi como versiones delite e altere datos restringite super le wiki.\n\nConsidera poner le base de datos in un loco completemente differente, per exemplo in /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Spatio de tabellas predefinite:", - "config-oracle-temp-ts": "Spatio de tabellas temporari:", "config-type-mysql": "MariaDB, MySQL o compatibile", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki supporta le sequente systemas de base de datos:\n\n$1\n\nSi tu non vide hic infra le systema de base de datos que tu tenta usar, alora seque le instructiones ligate hic supra pro activar le supporto.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] es le systema primari pro MediaWiki e le melio supportate. MediaWiki functiona anque con [{{int:version-db-mysql-url}} MySQL] e con [{{int:version-db-percona-url}} Percona Server], le quales es compatibile con MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Como compilar PHP con supporto de MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] es un systema de base de datos popular e open source, alternativa a MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Como compilar PHP con supporto de PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] es un systema de base de datos legier que es multo ben supportate. ([https://www.php.net/manual/en/pdo.installation.php Como compilar PHP con supporto de SQLite], usa PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] es un banca de datos commercial pro interprisas. ([https://www.php.net/manual/en/oci8.installation.php Como compilar PHP con supporto de OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] es un base de datos de interprisa commercial pro Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Como compilar PHP con supporto de SQLSRV])", "config-header-mysql": "Configuration de MariaDB/MySQL", "config-header-postgres": "Configuration de PostgreSQL", "config-header-sqlite": "Configuration de SQLite", - "config-header-oracle": "Configuration de Oracle", - "config-header-mssql": "Configuration de Microsoft SQL Server", "config-invalid-db-type": "Typo de base de datos invalide", "config-missing-db-name": "Es necessari entrar un valor pro \"{{int:config-db-name}}\".", "config-missing-db-host": "Es necessari entrar un valor pro \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Es necessari entrar un valor pro \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "TNS de base de datos \"$1\" invalide.\nUsa o \"TNS Name\" o un catena \"Easy Connect\". ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Methodos de nomenclatura de Oracle])", "config-invalid-db-name": "Nomine de base de datos \"$1\" invalide.\nUsa solmente litteras ASCII (a-z, A-Z), numeros (0-9), characteres de sublineamento (_) e tractos de union (-).", "config-invalid-db-prefix": "Prefixo de base de datos \"$1\" invalide.\nUsa solmente litteras ASCII (a-z, A-Z), numeros (0-9), characteres de sublineamento (_) e tractos de union (-).", "config-connection-error": "$1.\n\nVerifica le servitor, nomine de usator e contrasigno e reproba. Si tu usa \"localhost\" como nomine de servitor, essaya substituer \"127.0.0.1\" (o vice versa).", "config-invalid-schema": "Schema invalide pro MediaWiki \"$1\".\nUsa solmente litteras ASCII (a-z, A-Z), numeros (0-9) e characteres de sublineamento (_).", - "config-db-sys-create-oracle": "Le installator supporta solmente le uso de un conto SYSDBA pro le creation de un nove conto.", - "config-db-sys-user-exists-oracle": "Le conto de usator \"$1\" ja existe. SYSDBA pote solmente esser usate pro le creation de un nove conto!", "config-postgres-old": "PostgreSQL $1 o plus recente es requirite, tu ha $2.", - "config-mssql-old": "Microsoft SQL Server $1 o plus recente es necessari. Tu ha $2.", "config-sqlite-name-help": "Selige un nomine que identifica tu wiki.\nNon usar spatios o tractos de union.\nIsto essera usate pro le nomine del file de datos de SQLite.", "config-sqlite-parent-unwritable-group": "Impossibile crear le directorio de datos $1, proque le directorio superjacente $2 non concede le accesso de scriptura al servitor web.\n\nLe installator ha determinate le usator sub que le servitor web es executate.\nConcede le accesso de scriptura in le directorio $3 a iste usator pro continuar.\nIn un systema Unix/Linux:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Impossibile crear le directorio de datos $1, proque le directorio superjacente $2 non concede le accesso de scriptura al servitor web.\n\nLe installator non poteva determinar le usator sub que le servitor web es executate.\nConcede le accesso de scriptura in le directorio $3 a iste usator (e alteres!) pro continuar.\nIn un systema Unix/Linux:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -164,11 +147,6 @@ "config-mysql-engine": "Motor de immagazinage:", "config-mysql-innodb": "InnoDB (recommendate)", "config-mysql-engine-help": "'''InnoDB''' es quasi sempre le melior option, post que illo ha bon supporto pro simultaneitate.\n\n'''MyISAM''' pote esser plus rapide in installationes a usator singule o a lectura solmente.\nLe bases de datos MyISAM tende a esser corrumpite plus frequentemente que le base de datos InnoDB.", - "config-mssql-auth": "Typo de authentication:", - "config-mssql-install-auth": "Selige le typo de authentication a usar pro connecter al base de datos durante le processo de installation.\nSi tu selige \"{{int:config-mssql-windowsauth}}\", le credentiales del usator que executa le servitor web essera usate.", - "config-mssql-web-auth": "Selige le typo de authentication que le servitor web usara pro connecter al base de datos durante le operation ordinari del wiki.\nSi tu selige \"{{int:config-mssql-windowsauth}}\", le credentiales del usator que executa le servitor web essera usate.", - "config-mssql-sqlauth": "Authentication per SQL Server", - "config-mssql-windowsauth": "Authentication per Windows", "config-site-name": "Nomine del wiki:", "config-site-name-help": "Isto apparera in le barra de titulo del navigator e in varie altere locos.", "config-site-name-blank": "Entra un nomine de sito.", diff --git a/includes/installer/i18n/id.json b/includes/installer/i18n/id.json index 2a9872955a..d0b43ad2dd 100644 --- a/includes/installer/i18n/id.json +++ b/includes/installer/i18n/id.json @@ -94,13 +94,9 @@ "config-db-type": "Jenis basis data:", "config-db-host": "Inang basis data:", "config-db-host-help": "Jika server basis data Anda berada di server yang berbeda, masukkan nama inang atau alamat IP di sini.\n\nJika Anda menggunakan inang web bersama, penyedia inang Anda harus memberikan nama inang yang benar di dokumentasi mereka.\n\nJika Anda menginstal pada server Windows dan menggunakan MySQL, \"localhost\" mungkin tidak dapat digunakan sebagai nama server. Jika demikian, coba \"127.0.0.1\" untuk alamat IP lokal.\n\nJika Anda menggunakan PostgreSQL, biarkan field ini kosong untuk menghubungkan lewat soket Unix.", - "config-db-host-oracle": "TNS basis data:", - "config-db-host-oracle-help": "Masukkan [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name] yang sah; berkas tnsnames.ora harus dapat diakses oleh instalasi ini.
Jika Anda menggunakan pustaka klien 10g atau lebih baru, Anda juga dapat menggunakan metode penamaan [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifikasi wiki ini", "config-db-name": "Nama basis data:", "config-db-name-help": "Pilih nama yang mengidentifikasikan wiki Anda.\nNama tersebut tidak boleh mengandung spasi.\n\nJika Anda menggunakan inang web bersama, penyedia inang Anda dapat memberikan Anda nama basis data khusus untuk digunakan atau mengizinkan Anda membuat basis data melalui panel kontrol.", - "config-db-name-oracle": "Skema basis data:", - "config-db-account-oracle-warn": "Ada tiga skenario yang didukung untuk instalasi Oracle sebagai basis data pendukung:\n\nJika Anda ingin membuat akun basis data sebagai bagian dari proses instalasi, silakan masukkan akun dengan peran SYSDBA sebagai akun basis data untuk instalasi dan tentukan kredensial yang diinginkan untuk akun akses web. Jika tidak, Anda dapat membuat akun akses web secara manual dan hanya memberikan akun tersebut (jika memiliki izin yang diperlukan untuk membuat objek skema) atau memasukkan dua akun yang berbeda, satu dengan hak membuat objek dan satu dibatasi untuk akses web.\n\nSkrip untuk membuat akun dengan privilese yang diperlukan dapat ditemukan pada direktori \"maintenance/oracle/\" instalasi ini. Harap diingat bahwa penggunaan akun terbatas akan menonaktifkan semua kemampuan pemeliharaan dengan akun bawaan.", "config-db-install-account": "Akun pengguna untuk instalasi", "config-db-username": "Nama pengguna basis data:", "config-db-password": "Kata sandi basis data:", @@ -119,37 +115,24 @@ "config-pg-test-error": "Tidak dapat terhubung ke basis data $1: $2", "config-sqlite-dir": "Direktori data SQLite:", "config-sqlite-dir-help": "SQLite menyimpan semua data dalam satu berkas.\n\nDirektori yang Anda berikan harus dapat ditulisi oleh server web selama instalasi.\n\nDirektori itu '''tidak''' boleh dapat diakses melalui web, inilah sebabnya kami tidak menempatkannya bersama dengan berkas PHP lain.\n\nPenginstal akan membuat berkas .htaccess bersamaan dengan itu, tetapi jika gagal, orang dapat memperoleh akses ke basis data mentah Anda.\nItu termasuk data mentah pengguna (alamat surel, hash sandi) serta revisi yang dihapus dan data lainnya yang dibatasi pada wiki.\n\nPertimbangkan untuk menempatkan basis data di tempat lain, misalnya di /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Tablespace bawaan:", - "config-oracle-temp-ts": "Tablespace sementara:", "config-type-mysql": "MySQL (atau yang kompatibel)", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki mendukung sistem basis data berikut:\n\n$1\n\nJika Anda tidak melihat sistem basis data yang Anda gunakan tercantum di bawah ini, ikuti petunjuk terkait di atas untuk mengaktifkan dukungan.", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] adalah target utama MediaWiki dan memiliki dukungan terbaik. MediaWiki juga berjalan dengan [{{int:version-db-mariadb-url}} MariaDB] dan [{{int:version-db-percona-url}} Server Percona], yang kompatibel dengan MySQL. ([https://www.php.net/manual/en/mysql.installation.php Cara mengompilasi PHP dengan dukungan MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] adalah sistem basis data sumber terbuka populer sebagai alternatif MySQL.([https://www.php.net/manual/en/pgsql.installation.php Bagaimana mengompilasikan PHP dengan dukungan PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] adalah sistem basis data yang ringan yang sangat baik dukungannya. ([http://www.php.net/manual/en/pdo.installation.php cara mengompilasi PHP dengan dukungan SQLite], menggunakan PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] adalah basis data komersial untuk perusahaan. ([http://www.php.net/manual/en/oci8.installation.php cara mengompilasi PHP dengan dukungan OCI8])", - "config-dbsupport-mssql": "[{{int:version-db-mssql-url}} Microsoft SQL Server] adalah database perusahaan komersial untuk Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Bagaimana cara mengkompilasi PHP dengan dukungan SQLSRV])", "config-header-mysql": "Pengaturan MariaDB/MySQL", "config-header-postgres": "Pengaturan PostgreSQL", "config-header-sqlite": "Pengaturan SQLite", - "config-header-oracle": "Pengaturan Oracle", - "config-header-mssql": "Setelan Microsoft SQL Server", "config-invalid-db-type": "Jenis basis data tidak sah", "config-missing-db-name": "Anda harus memasukkan nilai untuk \"{{int:config-db-name}}\"", "config-missing-db-host": "Anda harus memasukkan nilai untuk \"{{int:config-db-host}}\"", - "config-missing-db-server-oracle": "Anda harus memasukkan nilai untuk \"{{int:config-db-host-oracle}}\"", - "config-invalid-db-server-oracle": "TNS basis data \"$1\" tidak sah.\nGunakan baik \"Nama TNS\" atau string \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Metode Penamaan Oracle]).", "config-invalid-db-name": "Nama basis data \"$1\" tidak sah.\nGunakan hanya huruf ASCII (a-z, A-Z), angka (0-9), garis bawah (_), dan tanda hubung (-).", "config-invalid-db-prefix": "Prefiks basis data \"$1\" tidak sah.\nGunakan hanya huruf ASCII (a-z, A-Z), angka (0-9), garis bawah (_), dan tanda hubung (-).", "config-connection-error": "$1.\n\nPeriksa nama inang, pengguna, dan sandi di bawah ini dan coba lagi.", "config-invalid-schema": "Skema MediaWiki \"$1\" tidak sah.\nGunakan hanya huruf ASCII (a-z, A-Z), angka (0-9), dan garis bawah (_).", - "config-db-sys-create-oracle": "Penginstal hanya mendukung penggunaan akun SYSDBA untuk membuat akun baru.", - "config-db-sys-user-exists-oracle": "Akun pengguna \"$1\"sudah ada. SYSDBA hanya dapat digunakan untuk membuat akun baru!", "config-postgres-old": "PostgreSQL $1 atau versi terbaru diperlukan, Anda menggunakan $2.", - "config-mssql-old": "Microsoft SQL Server $1 atau yang lebih baru dibutuhkan. Anda memiliki versi $2.", "config-sqlite-name-help": "Pilih nama yang mengidentifikasi wiki Anda.\nJangan gunakan spasi atau tanda hubung.\nNama ini akan digunakan untuk nama berkas data SQLite.", "config-sqlite-parent-unwritable-group": "Tidak dapat membuat direktori data $1, karena direktori induk $2 tidak bisa ditulisi oleh server web.\n\nPenginstal telah menentukan pengguna yang menjalankan server web Anda.\nBuat direktori $3 menjadi dapat ditulisi olehnya.\nPada sistem Unix/Linux lakukan hal berikut:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Tidak dapat membuat direktori data $1, karena direktori induk $2 tidak bisa ditulisi oleh server web.\n\nPenginstal tidak dapat menentukan pengguna yang menjalankan server web Anda.\nBuat direktori $3 menjadi dapat ditulisi oleh semua orang.\nPada sistem Unix/Linux lakukan hal berikut:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -173,11 +156,6 @@ "config-mysql-engine": "Mesin penyimpanan:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "'''InnoDB''' hampir selalu merupakan pilihan terbaik karena memiliki dukungan konkurensi yang baik.\n\n'''MyISAM''' mungkin lebih cepat dalam instalasi pengguna-tunggal atau hanya-baca.\nBasis data MyISAM cenderung lebih sering rusak daripada basis data InnoDB.", - "config-mssql-auth": "Jenis otentikasi:", - "config-mssql-install-auth": "Pilih jenis otentikasi yang akan digunakan untuk menyambung ke database selama proses instalasi.\nJika Anda memilih \"{{int:config-mssql-windowsauth}}\", kredensial dari pengguna apapun pada server web yang berjalan akan digunakan.", - "config-mssql-web-auth": "Pilih jenis otentikasi yang akan digunakan oleh server web untuk menyambung ke server basis data, selama operasi biasa dari wiki.\nJika Anda memilih \"{{int:config-mssql-windowsauth}}\", kredensial dari pengguna apapun pada server web yang berjalan akan digunakan.", - "config-mssql-sqlauth": "Otentikasi Server SQL", - "config-mssql-windowsauth": "Otentikasi Windows", "config-site-name": "Nama wiki:", "config-site-name-help": "Ini akan muncul di bilah judul peramban dan di berbagai tempat lainnya.", "config-site-name-blank": "Masukkan nama situs.", diff --git a/includes/installer/i18n/io.json b/includes/installer/i18n/io.json index fac0ad7ebc..74d8895172 100644 --- a/includes/installer/i18n/io.json +++ b/includes/installer/i18n/io.json @@ -52,9 +52,6 @@ "config-db-install-account": "Konto dil uzero por instalo", "config-db-username": "Uzero-nomo dil datumaro:", "config-db-password": "Pasovorto dil datumaro:", - "config-type-mssql": "Microsoft SQL Server", - "config-header-oracle": "Ajusti por Oracle-sistemo:", - "config-header-mssql": "Ajusti por Microsoft SQL Server", "config-invalid-db-type": "Nevalida tipo di datumaro.", "config-ns-generic": "Projeto", "config-ns-site-name": "Sama kam la wiki-nomo: $1", diff --git a/includes/installer/i18n/is.json b/includes/installer/i18n/is.json index 59c23175a4..7c4a0fad33 100644 --- a/includes/installer/i18n/is.json +++ b/includes/installer/i18n/is.json @@ -42,7 +42,6 @@ "config-db-type": "Tegund gagnagrunns:", "config-db-host": "Netþjónn gagnagrunns:", "config-db-name": "Heiti gagnagrunns (engin bandstrik):", - "config-db-name-oracle": "Gagnagrunnsskema:", "config-db-username": "Notandanafn á gagnagrunni:", "config-db-password": "Lykilorð gagnagrunns:", "config-db-port": "Gátt gagnagrunns:", @@ -50,21 +49,14 @@ "config-type-mysql": "MariaDB, MySQL, eða samhæft", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "Stillingar MariaDB/MySQL", "config-header-postgres": "Stillingar PostgreSQL", "config-header-sqlite": "Stillingar SQLite", - "config-header-oracle": "Stillingar Oracle", - "config-header-mssql": "Stillingar Microsoft SQL Server", "config-regenerate": "Endurgera LocalSettings.php →", "config-show-table-status": "SHOW TABLE STATUS beiðni mistókst!", "config-db-web-account": "Gagnagrunnsreikningur fyrir vefaðgang", "config-mysql-engine": "Gagnagrunnshýsing:", "config-mysql-innodb": "InnoDB (mælt með)", - "config-mssql-auth": "Tegund auðkenningar:", - "config-mssql-sqlauth": "SQL Server auðkenning", - "config-mssql-windowsauth": "Windows auðkenning", "config-ns-generic": "Verkefni", "config-admin-name": "Notandanafnið þitt:", "config-admin-password": "Lykilorð:", diff --git a/includes/installer/i18n/it.json b/includes/installer/i18n/it.json index 165a0570c5..cb72d91236 100644 --- a/includes/installer/i18n/it.json +++ b/includes/installer/i18n/it.json @@ -106,13 +106,9 @@ "config-db-type": "Tipo di database:", "config-db-host": "Host del database:", "config-db-host-help": "Se il server del tuo database è su un server diverso, immetti qui il nome dell'host o il suo indirizzo IP.\n\nSe stai utilizzando un web hosting condiviso, il tuo hosting provider dovrebbe fornirti il nome host corretto nella sua documentazione.\n\nSe stai utilizzando MySQL, l'uso di \"localhost\" potrebbe non funzionare correttamente come nome del server. In caso di problemi, prova a impostare \"127.0.0.1\" come indirizzo IP locale.\n\nSe usi PostgreSQL, lascia questo campo vuoto per consentire di connettersi tramite un socket Unix.", - "config-db-host-oracle": "TNS del database:", - "config-db-host-oracle-help": "Inserisci un valido [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; un file tnsnames.ora deve essere visibile a questa installazione.
Se stai usando la libreria cliente 10g o più recente puoi anche usare il metodo di denominazione [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifica questo wiki", "config-db-name": "Nome del database (no trattini):", "config-db-name-help": "Scegli un nome che identifica il tuo wiki.\nNon deve contenere spazi.\n\nSe utilizzi un web hosting condiviso, il tuo hosting provider o ti fornisce uno specifico nome di database da utilizzare, oppure ti consentirà di creare il database tramite un pannello di controllo.", - "config-db-name-oracle": "Schema del database:", - "config-db-account-oracle-warn": "Ci sono tre scenari supportati per l'installazione di Oracle come database di backend:\n\nSe vuoi creare un'utenza di database come parte del processo di installazione, fornisci un account con ruolo SYSDBA come utenza di database per l'installazione e specifica le credenziali volute per l'utenza di accesso web, altrimenti è possibile creare manualmente l'utenza di accesso web e fornire solo quell'account (se dispone delle autorizzazioni necessario per creare gli oggetti dello schema) o fornire due diverse utenze, una con i permessi di creazione e una per l'accesso web.\n\nScript per la creazione di un'utenza con le autorizzazioni necessarie può essere trovato nella directory \"maintenance/oracle/\" di questa installazione. Tieni presente che l'uso di un'utenza con restrizioni disabiliterà tutte le funzionalità di manutenzione con l'account predefinito.", "config-db-install-account": "Account utente per l'installazione", "config-db-username": "Nome utente del database:", "config-db-password": "Password del database:", @@ -131,34 +127,22 @@ "config-pg-test-error": "Impossibile connettersi al database '''$1''': $2", "config-sqlite-dir": "Directory data di SQLite:", "config-sqlite-dir-help": "SQLite memorizza tutti i dati in un unico file.\n\nLa directory che indicherai deve essere scrivibile dal server web durante l'installazione.\n\nDovrebbe essere non accessibile via web, è per questo che non la stiamo mettendo dove ci sono i file PHP.\n\nL'installatore scriverà insieme ad essa un file .htaccess, ma se il tentativo fallisse qualcuno potrebbe avere accesso al database grezzo.\nQuesto include dati utente grezzi (indirizzi, password cifrate) così come versioni eliminate e altri dati ad accesso limitato del wiki.\n\nConsidera l'opportunità di sistemare allo stesso tempo il database da qualche altra parte, per esempio in /var/lib/mediawiki/tuowiki.", - "config-oracle-def-ts": "Tablespace di default:", - "config-oracle-temp-ts": "Tablespace temporaneo:", "config-type-mysql": "MariaDB, MySQL o compatibile", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki supporta i seguenti sistemi di database:\n\n$1\n\nSe fra quelli elencati qui sotto non vedi il sistema di database che vorresti utilizzare, seguire le istruzioni linkate sopra per abilitare il supporto.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] è la configurazione preferibile per MediaWiki ed è quella meglio supportata. MediaWiki funziona anche con [{{int:version-db-mysql-url}} MySQL] e [{{int:version-db-percona-url}} Percona Server], che sono compatibili con MariaDB.([https://www.php.net/manual/en/mysqli.installation.php Come compilare PHP con supporto MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] è un popolare sistema di database open source come alternativa a MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Come compilare PHP con supporto PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] è un sistema di database leggero, che è supportato molto bene. ([https://www.php.net/manual/en/pdo.installation.php Come compilare PHP con supporto SQLite], utilizza PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] è un database di un'impresa commerciale. ([https://www.php.net/manual/en/oci8.installation.php Come compilare PHP con supporto OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] è un database di un'impresa commerciale per Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Come compilare PHP con supporto SQLSRV])", "config-header-mysql": "Impostazioni MySQL", "config-header-postgres": "Impostazioni PostgreSQL", "config-header-sqlite": "Impostazioni SQLite", - "config-header-oracle": "Impostazioni Oracle", - "config-header-mssql": "Impostazioni di Microsoft SQL Server", "config-invalid-db-type": "Tipo di database non valido", "config-missing-db-name": "È necessario immettere un valore per \"{{int:config-db-name}}\".", "config-missing-db-host": "È necessario immettere un valore per \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "È necessario immettere un valore per \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "TNS database \"$1\" non valido.\nUsa \"TNS Name\" o una stringa \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods]).", "config-invalid-db-name": "Nome di database \"$1\" non valido.\nUtilizza soltanto caratteri ASCII come lettere (a-z, A-Z), numeri (0-9), sottolineatura (_) e trattini (-).", "config-invalid-db-prefix": "Prefisso database \"$1\" non valido.\nUtilizza soltanto caratteri ASCII come lettere (a-z, A-Z), numeri (0-9), sottolineatura (_) e trattini (-).", "config-connection-error": "$1.\n\nControlla host, nome utente e password e prova ancora. Se stai usando \"localhost\" come host database, prova invece ad utilizzare \"127.0.0.1\" (o viceversa).", "config-invalid-schema": "Schema MediaWiki \"$1\" non valido.\nUsa solo lettere ASCII (a-z, A-Z), numeri (0-9) e caratteri di sottolineatura (_).", - "config-db-sys-create-oracle": "Il programma di installazione supporta solo l'utilizzo di un account SYSDBA per la creazione di un nuovo account.", - "config-db-sys-user-exists-oracle": "L'account utente \"$1\" esiste già. SYSDBA può essere usato solo per la creazione di un nuovo account!", "config-postgres-old": "PostgreSQL $1 o una versione successiva è necessaria, rilevata la $2.", - "config-mssql-old": "Si richiede Microsoft SQL Server $1 o successivo. Tu hai la versione $2.", "config-sqlite-name-help": "Scegli un nome che identifichi il tuo wiki.\nNon utilizzare spazi o trattini.\nQuesto servirà per il nome del file di dati SQLite.", "config-sqlite-parent-unwritable-group": "Non è possibile creare la directory dati $1, perché la directory superiore $2 non è scrivibile dal webserver.\n\nIl programma di installazione ha determinato l'utente con cui il server web è in esecuzione.\nForniscigli la possibilità di scrivere nella directory $3 per continuare.\nSu un sistema Unix/Linux:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Non è possibile creare la directory dati $1, perché la directory superiore $2 non è scrivibile dal webserver.\n\nIl programma di installazione non ha potuto determinare l'utente con cui il server web è in esecuzione.\nFornisci ad esso (ed altri!) la possibilità di scrivere globalmente nella directory $3 per continuare.\nSu un sistema Unix/Linux:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -183,11 +167,6 @@ "config-mysql-engine": "Storage engine:", "config-mysql-innodb": "InnoDB (consigliato)", "config-mysql-engine-help": "InnoDB è quasi sempre l'opzione migliore, in quanto ha un buon supporto della concorrenza.\n\nMyISAM potrebbe essere più veloce nelle installazioni monoutente o in sola lettura.\nI database MyISAM tendono a danneggiarsi più spesso dei database InnoDB.", - "config-mssql-auth": "Tipo di autenticazione:", - "config-mssql-install-auth": "Seleziona il tipo di autenticazione che verrà utilizzato per connettersi al database durante il processo di installazione.\nSe si seleziona \"{{int:config-mssql-windowsauth}}\", saranno utilizzate le credenziali dell'utente con cui viene eseguito il server web, qualunque esso sia.", - "config-mssql-web-auth": "Seleziona il tipo di autenticazione che il server web utilizzerà per connettersi al database, durante il normale funzionamento del wiki.\nSe si seleziona \"{{int:config-mssql-windowsauth}}\", saranno utilizzate le credenziali dell'utente con cui viene eseguito il server web, qualunque esso sia.", - "config-mssql-sqlauth": "Autenticazione di SQL Server", - "config-mssql-windowsauth": "Autenticazione di Windows", "config-site-name": "Nome del wiki:", "config-site-name-help": "Questo verrà visualizzato nella barra del titolo del browser e in vari altri posti.", "config-site-name-blank": "Inserisci il nome del sito.", diff --git a/includes/installer/i18n/ja.json b/includes/installer/i18n/ja.json index 94f3b9f009..5da1914672 100644 --- a/includes/installer/i18n/ja.json +++ b/includes/installer/i18n/ja.json @@ -109,13 +109,9 @@ "config-db-type": "データベースの種類:", "config-db-host": "データベースのホスト:", "config-db-host-help": "異なるサーバー上にデータベースサーバーがある場合、ホスト名またはIPアドレスをここに入力してください。\n\nもし、共有されたウェブホスティングを使用している場合、ホスティングプロバイダーは正確なホスト名を解説しているはずです。\n\nMySQLを使用している場合、「localhost」は、サーバー名としてはうまく働かないでしょう。もしそのような場合は、ローカルIPアドレスとして「127.0.0.1」を試してみてください。\n\nPostgreSQLを使用している場合、UNIXソケットで接続するにはこの欄を空欄のままにしてください。", - "config-db-host-oracle": "データベース TNS:", - "config-db-host-oracle-help": "有効な[http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm ローカル接続名]を入力してください。tnsnames.ora ファイルは、このインストール先から参照できる場所に置いてください。
ご使用中のクライアント ライブラリが 10g 以降の場合、[http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect] ネーミング メソッドを使用できます。", "config-db-wiki-settings": "このウィキの識別情報", "config-db-name": "データベース名 (ハイフンは使用不可):", "config-db-name-help": "このウィキを識別する名前を入力してください。\n空白を含めることはできません。\n\n共有ウェブホストを利用している場合、ホスティングプロバイダーが特定の使用可能なデータベース名を提供するか、あるいは管理パネルからデータベースを作成できるようにしているでしょう。", - "config-db-name-oracle": "データベースのスキーマ:", - "config-db-account-oracle-warn": "バックエンドのデータベースとして Oracle をインストールする場合、3つのシナリオが考えられます。\n\nデータベース用のアカウントをインストールのプロセス途中で作成したい場合、インストールに使うデータベース用のアカウントしては SYSDBAロール付きのアカウントを指定し、ウェブアクセス用アカウントには必要なログイン情報を指定してください。あるいは、ウェブアクセス用のアカウントを手動で作成して、そのアカウント(スキーマオブジェクトの作成のパーミッションを要求する場合)だけを使うか、二つの異なるアカウントを用意して一つは特権を付与できるもの、もう一つをウェブアクセス用の制限アカウントとしてください。\n\n要求された特権でアカウントを作成するスクリプトは、このインストール環境では、\"maintenance/oracle/\" にあります。制限アカウントを使用することは、デフォルトアカウントでのすべてのメンテナンス特権を無効にすることにご注意ください。", "config-db-install-account": "インストールで使用する利用者アカウント", "config-db-username": "データベースのユーザー名:", "config-db-password": "データベースのパスワード:", @@ -134,37 +130,24 @@ "config-pg-test-error": "データベース $1 に接続できません: $2", "config-sqlite-dir": "SQLite データ ディレクトリ:", "config-sqlite-dir-help": "SQLite は単一のファイル内にすべてのデータを格納しています。\n\n指定したディレクトリは、インストール時にウェブ サーバーが書き込めるようにしておく必要があります。\n\nこのディレクトリはウェブからアクセス不可能である必要があります。PHP ファイルがある場所には配置できないのはこのためです。\n\nインストーラーは .htaccess ファイルにも書き込みます。しかし、これが失敗した場合は、誰かが生のデータベースにアクセスできてしまいます。\nデータベースは、生のデータ (メールアドレス、パスワードのハッシュ値) の他、削除された版、その他ウィキ上の制限されているデータを含んでいます。\n\n例えば /var/lib/mediawiki/yourwiki のように、別の場所にデータベースを配置することを検討してください。", - "config-oracle-def-ts": "既定のテーブル領域:", - "config-oracle-temp-ts": "一時的なテーブル領域:", "config-type-mysql": "MariaDB、MySQLまたは互換製品", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "マイクロソフト SQL Server", "config-support-info": "MediaWiki は以下のデータベース システムに対応しています:\n\n$1\n\n使用しようとしているデータベース システムが下記の一覧にない場合は、上記リンク先の手順に従ってインストールしてください。", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB]はMediaWikiの主要な対象であり、最もよくサポートされています。MediaWikiはMariaDBと互換性のある[{{int:version-db-mysql-url}} MySQL]、[{{int:version-db-percona-url}} Percona Server]でも動きます。 ([https://www.php.net/manual/ja/mysqli.installation.php PHPをMySQLサポート付きでコンパイルする方法])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] は、MySQLの代替として人気がある公開のデータベースシステムです。([https://www.php.net/manual/en/pgsql.installation.php PHPをPostgreSQLサポート付きでコンパイルする方法])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite]は、良くサポートされている、軽量データベースシステムです。([https://www.php.net/manual/ja/pdo.installation.php SQLiteに対応したPHPをコンパイルする方法]、PDOを使用)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle]は商業企業のデータベースです。([https://www.php.net/manual/en/oci8.installation.php OCI8サポートなPHPをコンパイルする方法])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server]は商業企業のWindows用データベースです。([https://www.php.net/manual/en/sqlsrv.installation.php SQLSRVサポートなPHPをコンパイルする方法])", "config-header-mysql": "MariaDB/MySQL の設定", "config-header-postgres": "PostgreSQL の設定", "config-header-sqlite": "SQLite の設定", - "config-header-oracle": "Oracle の設定", - "config-header-mssql": "Microsoft SQL Server の設定", "config-invalid-db-type": "データベースの種類が無効です。", "config-missing-db-name": "「{{int:config-db-name}}」を入力してください", "config-missing-db-host": "「{{int:config-db-host}}」を入力してください。", - "config-missing-db-server-oracle": "「{{int:config-db-host-oracle}}」の値を入力してください", - "config-invalid-db-server-oracle": "「$1」は無効なデータベース TNS です。\n「TNS 名」「Easy Connect」文字列のいずれかを使用してください ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle ネーミング メソッド])。", "config-invalid-db-name": "「$1」は無効なデータベース名です。\n半角の英数字 (a-z、A-Z、0-9)、アンダースコア (_)、ハイフン (-) のみを使用してください。", "config-invalid-db-prefix": "「$1」は無効なデータベース接頭辞です。\n半角の英数字 (a-z、A-Z、0-9)、アンダースコア (_)、ハイフン (-) のみを使用してください。", "config-connection-error": "$1。\n\n以下のホスト名、ユーザー名、パスワードを確認してから再度試してください。データベースホストとして「localhost」を使用している場合は、代わりに 「127.0.0.1」を使用してください(またはその逆)。", "config-invalid-schema": "「$1」は MediaWiki のスキーマとして無効です。\n半角の英数字 (a-z、A-Z、0-9)、アンダースコア (_) のみを使用してください。", - "config-db-sys-create-oracle": "インストーラーは、新規アカウント作成にはSYSDBAアカウントの利用のみをサポートしています。", - "config-db-sys-user-exists-oracle": "利用者アカウント「$1」は既に存在します。SYSDBA は新しいアカウントの作成のみに使用できます!", "config-postgres-old": "PostgreSQL $1 以降が必要です。ご使用中の PostgreSQL は $2 です。", - "config-mssql-old": "Microsoft SQL Server $1 以降が必要です。ご使用中の Microsoft SQL Server は $2 です。", "config-sqlite-name-help": "あなたのウェキと同一性のある名前を選んでください。\n空白およびハイフンは使用しないでください。\nSQLiteのデータファイル名として使用されます。", "config-sqlite-parent-unwritable-group": "データ ディレクトリ $1 を作成できません。ウェブ サーバーは親ディレクトリ $2 に書き込めませんでした。\n\nインストーラーは、ウェブ サーバーの実行ユーザーを特定しました。\n続行するには、ディレクトリ $3 に書き込めるようにしてください。\nUnix または Linux であれば、以下を実行してください:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "データ ディレクトリ $1 を作成できません。ウェブ サーバーは、親ディレクトリ $2 に書き込めませんでした。\n\nインストーラーは、ウェブ サーバーの実行ユーザーを特定できませんでした。\n続行するには、ディレクトリ $3 に、ウェブ サーバー (と、あらゆる人々!) がグローバルに書き込めるようにしてください。\nUnix または Linux では、以下を実行してください:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -189,11 +172,6 @@ "config-mysql-engine": "ストレージ エンジン:", "config-mysql-innodb": "InnoDB(推奨)", "config-mysql-engine-help": "InnoDBは、並行処理のサポートに優れているので、ほとんどの場合において最良の選択肢です。\n\nMyISAMは、利用者が1人の場合、あるいは読み込み専用でインストールする場合に、より処理が早くなるでしょう。\nただし、MyISAMのデータベースは、InnoDBより高頻度で破損する傾向があります。", - "config-mssql-auth": "認証の種類:", - "config-mssql-install-auth": "インストール過程でデータベースに接続するために使用する認証の種類を選択してください。\n「{{int:config-mssql-windowsauth}}」を選択した場合、ウェブサーバーを実行しているユーザーの認証情報が使用されます。", - "config-mssql-web-auth": "ウィキの通常の操作の際にウェブサーバーがデータベースサーバーに接続するために使用する認証の種類を選択してください。\n「{{int:config-mssql-windowsauth}}」を選択した場合、ウェブサーバーを実行しているユーザーの認証情報が使用されます。", - "config-mssql-sqlauth": "SQL Server 認証", - "config-mssql-windowsauth": "Windows 認証", "config-site-name": "ウィキ名:", "config-site-name-help": "この欄に入力したウィキ名は、ブラウザーのタイトルバーなど様々な場所で利用されます。", "config-site-name-blank": "サイト名を入力してください。", diff --git a/includes/installer/i18n/ka.json b/includes/installer/i18n/ka.json index 9c4c3fb4e3..86b0f55527 100644 --- a/includes/installer/i18n/ka.json +++ b/includes/installer/i18n/ka.json @@ -31,18 +31,14 @@ "config-wincache": "[https://www.iis.net/downloads/microsoft/wincache-extension WinCache] დაყენდა", "config-diff3-bad": "GNU diff3 ვერ მოიძებნა.", "config-db-type": "მონაცემთა ბაზის ტიპი:", - "config-db-host-oracle": "მონაცემთა ბაზის TNS:", "config-db-name": "მონაცემთა ბაზის სახელი:", - "config-db-name-oracle": "მონაცემთა ბაზის სქემა:", "config-db-username": "მონაცემთა ბაზის მომხმარებლის სახელი:", "config-db-password": "მონაცემთა ბაზის პაროლი:", "config-db-port": "მონაცემთა ბაზის პორტი:", "config-db-schema": "მედიავიკის სქემა:", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "MySQL-ის პარამეტრები", "config-header-postgres": "PostgreSQL-ის პარამეტრები", "config-header-sqlite": "SQLite-ის პარამეტრები", - "config-header-oracle": "Oracle-ის პარამეტრები", "config-invalid-db-type": "არასწორი მონაცემთა ბაზის ტიპი", "config-sqlite-readonly": "ფაილი $1 ჩასაწერად მიუწვდომელია.", "config-mysql-innodb": "InnoDB", diff --git a/includes/installer/i18n/ko.json b/includes/installer/i18n/ko.json index a891d19361..e7008636c0 100644 --- a/includes/installer/i18n/ko.json +++ b/includes/installer/i18n/ko.json @@ -92,13 +92,9 @@ "config-db-type": "데이터베이스 종류:", "config-db-host": "데이터베이스 호스트:", "config-db-host-help": "데이터베이스 서버가 다른 서버에 있으면 여기에 호스트 이름이나 IP 주소를 입력하세요.\n\n공유하는 웹 호스팅을 사용하고 있으면 호스팅 제공 업체는 올바른 호스트 이름을 설명하고 있을 것입니다.\n\nWindows 서버에 설치하고 MySQL을 사용하면 \"localhost\"가 서버 이름으로는 작동하지 않을 수 있습니다. 그렇게 된다면 로컬 IP 주소로 \"127.0.0.1\"을 시도하세요.\n\nPostgreSQL을 사용하면 유닉스 소켓을 통해 연결되도록 입력란을 비워두세요.", - "config-db-host-oracle": "데이터베이스 TNS:", - "config-db-host-oracle-help": "올바른 [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm 로컬 연결 이름]을 입력하세요. tnsnames.ora 파일이 이 설치 위치에서 참조할 수 있는 곳에 있어야 합니다.
10g 이후의 클라이언트 라이브러리를 사용하는 경우 [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm 쉬운 연결] 네이밍 메서드도 사용할 수 있습니다.", "config-db-wiki-settings": "이 위키 식별", "config-db-name": "데이터베이스 이름 (하이픈 없음):", "config-db-name-help": "위키를 식별하기 위한 이름을 선택하세요.\n공백이 없어야 합니다.\n\n공유하는 웹 호스팅 사용하면 호스팅 제공 업체가 특정 데이터베이스 이름을 제공하거나 제어판에서 데이터베이스를 만들 수 있습니다.", - "config-db-name-oracle": "데이터베이스 스키마:", - "config-db-account-oracle-warn": "데이터베이스 백엔드로 Oracle을 설치하기 위해 지원하는 세 가지 시나리오가 있습니다:\n\n설치 과정의 일부로 데이터베이스 계정을 만들려면 설치를 위해 데이터베이스 계정으로 SYSDBA 역할을 가진 계정을 제공하고 웹 접근 계정에 대해 원하는 자격 증명을 지정하세요, 그렇지 않으면 수동으로 웹 접근 계정을 만들 수 있으며 (스키마 개체를 만들 권한이 필요한 경우) 또는 생성 권한을 가진 계정과 웹 접근이 제한된 계정의 두 가지 다른 계정을 제공할 수도 있습니다\n\n필요한 권한을 가진 계정을 만드는 스크립트는 이 설치 위치의 \"maintenance/oracle/\" 디렉터리에서 찾을 수 있습니다. 제한된 계정을 사용하면 기본 계정의 모든 유지 관리 기능이 비활성화된다는 점에 유의하십시오.", "config-db-install-account": "설치를 위한 사용자 계정", "config-db-username": "데이터베이스 사용자 이름:", "config-db-password": "데이터베이스 비밀번호:", @@ -117,35 +113,22 @@ "config-pg-test-error": "$1 데이터베이스에 연결할 수 없습니다: $2", "config-sqlite-dir": "SQLite 데이터 디렉터리:", "config-sqlite-dir-help": "SQLite는 하나의 파일에 모든 데이터를 저장합니다.\n\n입력한 디렉토리는 설치하는 동안 웹 서버가 쓸 수 있어야 합니다.\n\n이 디렉토리는 웹을 통해 접근할 수 없어야 합니다. PHP 파일이 있는 곳에 넣을 수 없는 것은 이 때문입니다.\n\n설치 관리자는 .htaccess 파일을 작성하지만, 이것이 실패하면 누군가가 원본 데이터베이스에 접근할 수 있습니다.\n데이터베이스는 원본 사용자 데이터(이메일 주소, 해시한 비밀번호)뿐만 아니라 삭제된 판과 위키의 다른 제한된 데이터를 포함합니다.\n\n예를 들어 /var/lib/mediawiki/yourwiki와 같이 다른 곳에 데이터베이스를 넣는 것이 좋습니다.", - "config-oracle-def-ts": "기본 테이블공간:", - "config-oracle-temp-ts": "임시 테이블공간:", "config-type-mysql": "MariaDB, MySQL 및 호환", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL 서버", "config-support-info": "미디어위키는 다음의 데이터베이스 시스템을 지원합니다:\n\n$1\n\n데이터베이스 시스템이 표시되지 않을 때 아래에 나열된 다음 지원을 활성화하려면 위의 링크된 지시에 따라 설치해볼 수 있습니다.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB]는 미디어위키의 기본 대상이며 가장 잘 지원됩니다. 미디어위키는 또한 MariaDB와 호환되는 [{{int:version-db-mysql-url}} MySQL]과 [{{int:version-db-percona-url}} Percona 서버]에서도 작동합니다. ([https://www.php.net/manual/en/mysql.installation.php MySQL 지원으로 PHP를 컴파일하는 방법])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL]은 MySQL의 대안으로서 인기 있는 오픈 소스 데이터베이스 시스템입니다. ([https://www.php.net/manual/en/pgsql.installation.php PostgreSQL 지원으로 PHP를 컴파일하는 방법])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite]는 매우 잘 지원되고 가벼운 데이터베이스 시스템입니다. ([https://www.php.net/manual/en/pdo.installation.php SQLite 지원으로 PHP를 컴파일하는 방법], PDO 사용)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle]은 상용 기업 데이터베이스입니다. ([https://www.php.net/manual/en/oci8.installation.php OCI8 지원으로 PHP를 컴파일하는 방법])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL 서버]는 Windows용 상용 기업 데이터베이스입니다. ([https://www.php.net/manual/en/sqlsrv.installation.php SQLSRV 지원으로 PHP를 컴파일하는 방법])", "config-header-mysql": "MariaDB/MySQL 설정", "config-header-postgres": "PostgreSQL 설정", "config-header-sqlite": "SQLite 설정", - "config-header-oracle": "Oracle 설정", - "config-header-mssql": "Microsoft SQL 서버 설정", "config-invalid-db-type": "잘못된 데이터베이스 종류", "config-missing-db-name": "\"{{int:config-db-name}}\"에 대한 값을 입력해야 합니다.", "config-missing-db-host": "\"{{int:config-db-host}}\"에 대한 값을 입력해야 합니다.", - "config-missing-db-server-oracle": "\"{{int:config-db-host-oracle}}\"에 대한 값을 입력해야 합니다.", - "config-invalid-db-server-oracle": "\"$1\" 데이터베이스 TNS가 잘못됐습니다.\n\"TNS Name\"이나 \"Easy Connect\" 문자열 중 하나를 사용하세요 ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle 네이밍 메서드]).", "config-invalid-db-name": "\"$1\" 데이터베이스 이름이 잘못되었습니다.\nASCII 글자 (a-z, A-Z), 숫자 (0-9), 밑줄 (_)과 하이픈 (-)만 사용하세요.", "config-invalid-db-prefix": "\"$1\" 데이터베이스 접두어가 잘못됐습니다.\nASCII 글자 (a-z, A-Z), 숫자 (0-9), 밑줄 (_)과 하이픈 (-)만 사용하세요.", "config-connection-error": "$1.\n\n호스트, 계정 이름과 비밀번호를 확인하고 다시 시도하세요.", "config-invalid-schema": "미디어위키 \"$1\"에 대한 스키마가 잘못됐습니다.\nASCII 글자 (a-z, A-Z), 숫자 (0-9), 밑줄 (_)과 하이픈 (-)만 사용하세요.", - "config-db-sys-create-oracle": "설치 관리자는 새 계정을 만들기 위한 SYSDBA 계정만을 지원합니다.", - "config-db-sys-user-exists-oracle": "\"$1\" 사용자 계정이 이미 존재합니다. SYSDBA는 새 계정을 만드는 데에만 사용할 수 있습니다!", "config-postgres-old": "PostgreSQL $1 이상이 필요합니다. $2이(가) 있습니다.", - "config-mssql-old": "Microsoft SQL 서버 $1 이상의 버전이 필요합니다. 현재 버전은 $2입니다.", "config-sqlite-name-help": "위키를 식별하기 위한 이름을 선택하세요.\n공백이나 하이픈을 사용하지 마십시오.\nSQLite 데이터 파일 이름에 사용됩니다.", "config-sqlite-parent-unwritable-group": "$1 데이터 디렉토리를 만들 수 없으며, 이는 웹 서버는 상위 디렉토리인 $2에 쓸 수 없기 때문입니다.\n\n설치 관리자는 웹 서버로 실행 중인 사용자를 지정할 수 없습니다.\n계속하려면 웹 서버가 쓸 수 있는 $3 디렉토리를 만드세요.\n유닉스/리눅스 시스템에서의 수행:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "$1 데이터 디렉토리를 만들 수 없으며, 이는 웹 서버가 상위 디렉토리인 $2에 쓸 수 없기 때문입니다.\n\n설치 관리자는 웹 서버로 실행 중인 사용자를 지정할 수 없습니다.\n계속하려면 웹 서버(와 그 외 서버!)가 전역으로 쓸 수 있는 $3 디렉토리를 만드세요.\n유닉스/리눅스 시스템에서의 수행:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -170,11 +153,6 @@ "config-mysql-engine": "저장소 엔진:", "config-mysql-innodb": "InnoDB (권장)", "config-mysql-engine-help": "InnoDB는 동시 실행 지원이 우수하기 때문에 대부분의 경우 최고의 옵션입니다.\n\nMyISAM은 단일 사용자나 읽기 전용 설치에서 더 빠를 수 있습니다.\nMyISAM 데이터베이스는 InnoDB 데이터베이스보다 더 자주 손실될 수 있습니다.", - "config-mssql-auth": "인증 형식:", - "config-mssql-install-auth": "설치 과정 중 데이터베이스에 연결하는 데 사용할 인증 형식을 선택하세요.\n\"{{int:config-mssql-windowsauth}}\"을 선택하시면 웹서버를 실행 중인 아무 사용자의 자격 증명이 사용됩니다.", - "config-mssql-web-auth": "위키가 일반적인 작업을 수행하는 동안 데이터베이스 서버에 연결하는 데 사용할 인증 형식을 선택하세요.\n\n\"{{int:config-mssql-windowsauth}}\"을 선택하시면 웹서버를 실행 중인 아무 사용자의 자격 증명이 사용됩니다.", - "config-mssql-sqlauth": "SQL 서버 인증", - "config-mssql-windowsauth": "Windows 인증", "config-site-name": "위키 이름:", "config-site-name-help": "브라우저 제목 표시줄과 다른 여러 곳에 나타납니다.", "config-site-name-blank": "사이트 이름을 입력하세요.", diff --git a/includes/installer/i18n/ksh.json b/includes/installer/i18n/ksh.json index 2a23c6d5f3..5a8148e9fc 100644 --- a/includes/installer/i18n/ksh.json +++ b/includes/installer/i18n/ksh.json @@ -81,13 +81,9 @@ "config-db-type": "De Zoot Daatebangk:", "config-db-host": "Dä Name vun däm Rääschner met dä Daatebangk:", "config-db-host-help": "Wann Dinge ẞööver för de Daatebangk ob enem andere Rääschner es, donn heh dämm singe Name udder dämm sing IP-Addräß enjävve.\n\nWann De ob enem Meetẞööver beß, weet Der Dinge Provaider odder däm sing Dokemäntazjuhn saare, wat De endraare moß.\n\nWann De ob enem ẞööver onger Windows am enshtalleere bes un en MySQL-Daatebangk häs, künnd_et sin, dat „localhost“ nit douch för der Name vum ẞööver. Wann dad-esu es, versöhg et ens met „127.0.0.1“ als IP-Addräß vum eije Rääschner.\n\nWann De ene PostgreSQL-ẞööver häs, donn dat Fäld läddesch lohße, öm en Verbendung övver e Unix socket opzemaache.", - "config-db-host-oracle": "Dä Daatebangk ier TNS:", - "config-db-host-oracle-help": "Donn ene jöltije [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm „Local Connect“-Name] aanjävve. De Dattei „tnsnames.ora“ moß för heh dat Projamm seschbaa un ze Lässe sin.
Wann heh de Projamm_Biblijoteeke für de Aanwänderprojramme för de Version 10g udder neuer enjesaz wääde, kam_mer och et [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm „Easy Connect“] jenumme wääde för der Name ze verjävve.", "config-db-wiki-settings": "De Daate vum Wiki", "config-db-name": "Dä Nahme vun dä Daatebangk:", "config-db-name-help": "Jiff ene Name aan, dä för Ding Wiki passe deiht.\nDoh sullte kei Zweschrereum un kein Stresche dren sin.\n\nWann De nit op Dingem eije Rääschner bes, künnt et sin, dat Dinge Provaider Der extra ene beshtemmpte Name för de Daatebangk jejovve hät, uffr dat de dä drom froore moß udder dat De de Daatebangke övver e Fommulaa selver enreeschte moß.", - "config-db-name-oracle": "Schema för de Daatebangk:", - "config-db-account-oracle-warn": "Mer han drei Aate, wi mer Oracle als Dahtebangk aanbenge künne.\n\nWann De ene neue Zohjang op de Dahtenbangk met Nahme un Paßwoot mem Projramm för et Opsäze aanlääje wells, dann jif ene Zohjang met däm Rääsch „SYSDBA“ aan, dä et alld jitt, un jif däm di Daate aan för dä neue Zohjang aanzelääje.\nDo kanns och dä neue Zohjang vun Hand aanlääje un heh beim Opsäze nur dää aanjävve — wann dä dat Rääsch hät, en de Daatebangk Schema_Objäkte aanzelääje.\nUdder De jiß zwei ongerscheidlijje Zohjäng op de Daatenbangk aan, woh eine vun dat Rääsch zom Aanlääje hät un dä andere moß dat nit un es för der nomaale Bedrief zohshtändesch.\n\nEn Skrep, wat ene Zohjang op de Dahtenbangk aanlääsch met all dä nüüdejje Rääschde, fengks De em Verzeishneß maintenance/oracle/ vun Dingem MediaWiki. Donn draan dengke, dat ene Zohjang met beschrängkte Rääschde all di Müjjeleschkeite för et Waade un Repareere nit hät, di de jewöhnlejje Zoot Zohjang met sesh brängk.", "config-db-install-account": "Der Zohjang för en Enreeschte", "config-db-username": "Dä Name vun däm Aanwender för dä Zohjref op de Daatebangk:", "config-db-password": "Et Paßwoot vun däm Aanwender för dä Zohjref op de Daatebangk:", @@ -106,37 +102,24 @@ "config-pg-test-error": "Mer krijje kein Verbendung zor Daatebank '''$1''': $2", "config-sqlite-dir": "Dem SQLite sing Daateverzeishnes:", "config-sqlite-dir-help": "SQLite hät all sing Daate zosamme en en einzel Dattei.\n\nEn dat Verzeishneß, wat De aanjiß, moß dat Web_ẞööver_Projramm beim Opsäze eren schriive dörrve.\n\nDat Verzeishneß sullt '''nit''' övver et Web zohjänglesch sin, dröm dom_mer et nit dohen, woh de PHP-Datteije sin.\n\nMer donn beim Opsäze zwa uß Vöörssh en .htaccess Dattei dobei, ävver wann di nit werrek, künnte Lück vun ußerhallef aan Ding Daatebangk_Dattei eraan kumme.\nDoh shtonn Saache dren, wi de Addräße för de Metmaacher ier e-mail un de verschlößelte Paßwööter un de vershtoche un de fottjeschmeße Sigge un ander Saache ussem Wiki, di mer nit öffentlesch maache darref.\n\nDonn Ding Daatebangk et beß janz woh anders hen, noh /var/lib/mediawiki/''wikiname'' för e Beishpell.", - "config-oracle-def-ts": "Tabälleroum för der Shtandattjebruch:", - "config-oracle-temp-ts": "Tabälleroum för der Jebruch zweschedorsh:", "config-type-mysql": "MySQL (udder en jlischwääteje)", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Dä SQL-ẞööver vun Microsoft", "config-support-info": "MediaWiki kann met heh dä Daatebangk_Süßteeme zosamme jonn:\n\n$1\n\nWann dat Daatebangk_Süßteem, wat De nämme wells, onge nit dobei es, dann donn desch aan di Aanleidonge hallde, di bovve verlengk sen, öm et op Dingem ẞööver singem Süßteem müjjelesh ze maache, se aan et Loufe ze krijje.", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] es dat vum MediaWiki et eets un et bäß ongerschtöz Daatebangksüßtehm. Et leuf ävver och met [{{int:version-db-mariadb-url}} MariaDB] un [{{int:version-db-percona-url}} Percona Server]. Di sin kumpatihbel mem MySQL. ([https://www.php.net/manual/de/mysql.installation.php Aanleidung för et Övversäze un Enreeschte von PHP met MySQL dobei, op Deutsch])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] es e bikannt Daatebangksüßtehm met offe Quälltäxde, un ed es och en Wahl nävve MySQL. Et sinn_er ävver paa klein Fählersche bekannt, um mer künne et em Momang för et reschtijje Werke nit ämfähle. ([https://www.php.net/manual/de/pgsql.installation.php Aanleidung för et Övversäze un Enreeschte von PHP met PostgreSQL dobei, op Deutsch])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] es e eijfach Daatebangksüßtehm, wat joot en Schoß jehallde weed. ([http://www.php.net/manual/de/pdo.installation.php Aanleidong för et Övversäze un Enreeschte von PHP met SQLite dobei, op Deutsch])", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] es e jeschäfflesch Daatebangksüßtehm för Ferme. ([http://www.php.net/manual/de/oci8.installation.php Aanleidong för et Övversäze un Enreeschte von PHP met OCI8 dobei, op Deutsch])", - "config-dbsupport-mssql": "* Dä [{{int:version-db-mssql-url}} Microsoft SQL Server] es e jeschäfflesch Dahtebangksüßtehm för Rääschner met Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Aanleidong för et Övversäze un Enreeschte von PHP met SQLSRV dobei, op Deutsch])", "config-header-mysql": "De Enshtällunge för de MySQL Daatebangk", "config-header-postgres": "De Enshtällunge för de PostgreSQL Daatebangk", "config-header-sqlite": "De Enshtällunge för de SQLite Daatebangk", - "config-header-oracle": "De Enshtällunge för de Oracle Daatebangk", - "config-header-mssql": "Enschtällonge för der SQL-ẞööver vun Microsoft", "config-invalid-db-type": "Dat es en onjöltijje Zoot Daatebangk.", "config-missing-db-name": "Do moß jäd enjävve för \"{{int:config-db-name}}\".", "config-missing-db-host": "Do moß jät enjävve för \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Do moß jät enjävve för \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "Dä Daatebangk ier TNS kann nit „$1“ sin, dat es esu nit jöltesch.\nNemm en „TNS-Nahme“ udder ene „Easy-Connect“-Easy-ConnectString(Lor noh dädohwähje noh de [http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods])", "config-invalid-db-name": "Dä Daatebangk iere Name kann nit „$1“ sin, dä es esu nit jöltesch.\nDöh dörve bloß ASCII Boochshtaabe (a-z, A-Z), Zahle (0-9), Ongerstresh (_), un Bendeshtresh (-) dren vörkumme.", "config-invalid-db-prefix": "Dä Vörsaz för de Name vun de Tabälle en de Daatebangk kann nit „$1“ sin, dä es esu nit jöltesch.\nDöh dörve bloß ASCII Boochshtaabe (a-z, A-Z), Zahle (0-9), Ongerstreshe (_), un Bendeshtreshe (-) dren vörkumme.", "config-connection-error": "$1.\n\nDonn de Name för dä Rääschner, vun däm Aanwender för dä Zohjref op de Daatebangk, un et Paßwoot prööfe, repareere, un dann versöhg et norr_ens.", "config-invalid-schema": "Dat Schema för MediaWiki kann nit „$1“ sin, dä Name wöhr esu nit jöltesch.\nDöh dörve bloß ASCII Boochshtaabe (a-z, A-Z), Zahle (0-9), un Ongerstreshe (_) dren vörkumme.", - "config-db-sys-create-oracle": "Dat Projramm för MehdijaWikki opzesäze kann blohß ene SYSDBA-Zohjang bruche för ene neuje Zohjang zor Dahtebangk ennzereeschte.", - "config-db-sys-user-exists-oracle": "Dä Aanwender „$1“ för dä Zohjref op de Daatebangk jidd_et ald. SYSDBA kam_mer bloß bruche, för ene neue Zohjang enzereeschte!", "config-postgres-old": "Mer bruche PostgreSQL $1 udder neuer. Em Momang es PostgreSQL $2 aam Loufe.", - "config-mssql-old": "Dä SQL-ẞööver vun Microsoft aff de Väsjohn $1 es nüüdesch. Heh es bloß d Väsjohn $2 ze fenge.", "config-sqlite-name-help": "Söhk ene Nahme uß, dä Ding Wikki beschrief.\nDonn kein Bendeschresch un Zweschräum en däm Name bruche.\nDä Name weed för der Datteinahme för de SQLite Dahtebangk jenumme.", "config-sqlite-parent-unwritable-group": "Mer kunnte dat Verzeischneß för de Daate, $1, nit enreeschte, weil dat Projramm fö dä Web_ẞööver en dat Verzeischneß doh drövver, $2, nix erin donn darref.\n\nMer han dä Name vun däm Zohjang op et Süßteem eruß jefonge, onger dämm dat Web_ẞööver_Projramm läuf. Jez moß De bloß doför sorrje, dat dä en dat Verzeischneß $3 schrieve kann, öm heh wigger maache ze künne.\nOb enem Süßteem met Unix- oder Linux jeiht dat esu:\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Mer kunnte dat Verzeischneß för de Daate, $1, nit enreeschte, weil dat Projramm fö dä Web_ẞööver en dat Verzeischneß doh drövver, $2, nix erin donn darref.\n\nMer han dä Name vun däm Zohjang op et Süßteem nit eruß fenge künne, onger dämm dat Web_ẞööver_Projramm läuf. Jez moß De bloß doför sorrje, dat dä en dat Verzeischneß $3 schrieve kann, öm heh wigger maache ze künne. Wann De dä Name och nit weiß, maach, dat jeeder_ein doh schrieve kann.\nOb enem Süßteem met Unix- oder Linux jeiht dat esu:\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -160,11 +143,6 @@ "config-mysql-engine": "De Zoot udder et Fommaat vun de Tabälle:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "InnoDB es fö jewöhnlesch et beß, weil vill Zohjreffe op eijmohl joot ongershtöz wääde.\n\nMyISAM es flöcker op Rääschnere met bloß einem Minsch draan, un bei Wikis, di mer bloß lässe un nit schrieeve kann.\nMyISAM-Daatebangke han em Schnett mih Fähler un jon flöcker kappott, wi InnoDB-Daatebangke.", - "config-mssql-auth": "De Zoot Aanmäldong:", - "config-mssql-install-auth": "Söhk us, wi dat Aanmälde aan dä Daatebangk vor sesch jonn sull för de Enschtallazjuhn.\nWann De {{int:Config-mssql-windowsauth}} nemms, weed jenumme, met wat emmer dä Wäbßööver aam loufe es.", - "config-mssql-web-auth": "Söhk us, wi dat Aanmälde aan dä Daatebangk vör sesch jonn sull för de nommaale Ärbeid vum Wiki.\nWann De {{int:Config-mssql-windowsauth}} nemms, weed dat jenumme, wohmet dä Wäbßööver aam loufe es.", - "config-mssql-sqlauth": "De Aanmäldong bemm SQL-ẞööver vun Microsoft", - "config-mssql-windowsauth": "De Annmäldong bemm Windows", "config-site-name": "Däm Wikki singe Nahme:", "config-site-name-help": "Dä douch en dä Övverschreff vun de Brauserfinstere un aan ätlije andere Schtälle op.", "config-site-name-blank": "Donn ene Name för di Sait aanjävve.", diff --git a/includes/installer/i18n/ku-latn.json b/includes/installer/i18n/ku-latn.json index 231271c6d2..ca617d00f6 100644 --- a/includes/installer/i18n/ku-latn.json +++ b/includes/installer/i18n/ku-latn.json @@ -35,7 +35,6 @@ "config-db-install-account": "Hesabê bikarhêner bo avakirinê", "config-db-username": "Navê bikarhêner bo danagehê:", "config-db-password": "Şîfreya danegehê:", - "config-type-mssql": "Microsoft SQL Server", "config-invalid-db-type": "Cureya danegehê ya nederbasdar", "config-sqlite-readonly": "Dosyeya $1 ne nivîsbar e.", "config-db-web-account": "Hesabê danegehê bô têgihiştina tora înternetê", diff --git a/includes/installer/i18n/lb.json b/includes/installer/i18n/lb.json index e6e12f1ef1..d38c73397d 100644 --- a/includes/installer/i18n/lb.json +++ b/includes/installer/i18n/lb.json @@ -61,10 +61,8 @@ "config-using-uri": "D'Server URL \"$1$2\" gëtt benotzt.", "config-db-type": "Datebanktyp:", "config-db-host": "Host vun der Datebank:", - "config-db-host-oracle": "Datebank-TNS:", "config-db-wiki-settings": "Dës Wiki identifizéieren", "config-db-name": "Numm vun der Datebank:", - "config-db-name-oracle": "Datebankschema:", "config-db-install-account": "Benotzerkont fir d'Installatioun", "config-db-username": "Datebank-Benotzernumm:", "config-db-password": "Passwuert vun der Datebank:", @@ -78,29 +76,18 @@ "config-db-schema-help": "D'Schemaen hei driwwer si gewéinlech korrekt.\nÄnnert se nëmme wann Dir wësst datt et néideg ass.", "config-pg-test-error": "Et ass net méiglech d'Datebank '''$1''' ze kontaktéieren: $2", "config-sqlite-dir": "Repertoire vun den SQLite-Donnéeën", - "config-oracle-def-ts": "Standard 'tablespace':", - "config-oracle-temp-ts": "Temporären 'tablespace':", "config-type-mysql": "MariaDB, MySQL, oder kompatibel", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] ass e beléiften Open-Source-Datebanksystem an eng Alternativ zu MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Uleedung fir d'Kompilatoun vu PHP mat PostgreSQL-Ënnerstëtzung])", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] ass eng kommerziell Datebank-Software. ([http://www.php.net/manual/en/oci8.installation.php How to compile PHP mat OCI8 Ënnerstëtzung])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] ass eng kommerziell Datebank-Software fir Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Wéi PHP mat SQLSRV Ënnerstëtzung kompiléieren])", "config-header-mysql": "MariaDB/MySQL-Astellungen", "config-header-postgres": "PostgreSQL-Astellungen", "config-header-sqlite": "SQLite-Astellungen", - "config-header-oracle": "Oracle-Astellungen", - "config-header-mssql": "Microsoft SQL Server Astellungen", "config-invalid-db-type": "Net valabelen Datebank-Typ", "config-missing-db-name": "Dir musst e Wäert fir \"{{int:config-db-name}}\" aginn", "config-missing-db-host": "Dir musst e Wäert fir \"{{int:config-db-host}}\" aginn.", - "config-missing-db-server-oracle": "Dir musst e Wäert fir \"{{int:config-db-host-oracle}}\" aginn", "config-connection-error": "$1.\n\nKuckt den Numm vum Server, de Benotzernumm an d'Passwuert no a probéiert et nach eng Kéier.", - "config-db-sys-user-exists-oracle": "De Benotzerkont \"$1\" gëtt et schonn. SYSDBA kann nëmme benotzt gi fir en neie Benotzerkont opzemaachen.", "config-postgres-old": "PostgreSQL $1 oder eng méi nei Versioun gëtt gebraucht, Dir hutt $2.", - "config-mssql-old": "Microsoft SQL Server $1 oder eng méi rezent Versioun gëtt gebraucht. Dir hutt d'Versioun $2.", "config-sqlite-name-help": "Sicht en Numm deen Är wiki identifizéiert.\nBenotzt keng Espacen a Bindestrécher.\nE gëtt fir den Numm vum SQLite Date-Fichier benotzt.", "config-sqlite-readonly": "An de Fichier $1 Kann net geschriwwe ginn.", "config-sqlite-cant-create-db": "Den Datebank-Fichier $1 konnt net ugeluecht ginn.", @@ -111,9 +98,6 @@ "config-db-web-account-same": "Dee selwechte Kont wéi bei der Installatioun benotzen", "config-db-web-create": "De Kont uleeë wann et e net scho gëtt", "config-mysql-innodb": "InnoDB (recommandéiert)", - "config-mssql-auth": "Typ vun der Authentifikatioun:", - "config-mssql-sqlauth": "SOL-Server-Authentifikatioun", - "config-mssql-windowsauth": "Windows-Authentifikatioun", "config-site-name": "Numm vun der Wiki:", "config-site-name-help": "Dësen daucht an der Titelleescht vum Browser an op verschiddenen anere Plazen op.", "config-site-name-blank": "Gitt den Numm vum Site un.", diff --git a/includes/installer/i18n/li.json b/includes/installer/i18n/li.json index a1b55a8ecb..17a0c6e754 100644 --- a/includes/installer/i18n/li.json +++ b/includes/installer/i18n/li.json @@ -41,7 +41,6 @@ "config-diff3-bad": "GNU diff3 neet gevónje.", "config-db-type": "Databanksaort:", "config-db-host": "Databankgashieër:", - "config-db-host-oracle": "Databank-TNS:", "config-db-wiki-settings": "Identificeer deze wiki", "config-db-name": "Databanknaam:", "mainpagetext": "MediaWiki software geïnsjtalleerd.", diff --git a/includes/installer/i18n/lij.json b/includes/installer/i18n/lij.json index d555bc72b8..7ad56ff9d4 100644 --- a/includes/installer/i18n/lij.json +++ b/includes/installer/i18n/lij.json @@ -80,13 +80,9 @@ "config-db-type": "Tipo de database:", "config-db-host": "Host do database:", "config-db-host-help": "Se o serviou do to database o l'è insce 'n serviou despægio, inmetti chì o nomme de l'host ò o so adresso IP.\n\nSe ti doeuvi un web hosting condiviso, o to hosting provider o doviæ fornite o nomme host corretto inta so documentaçion.\n\nSe t'ê aproeuvo a instalâ insce 'n serviou Windows con uso de MySQL, l'uso de \"localhost\" o porriæ no fonçionâ correttamente comme nomme do serviou. In caxo de problemi, proeuva a impostâ \"127.0.0.1\" comme adresso IP locale.\n\nSe ti t'adoeuvi PostgreSQL, lascia questo campo voeuo pe consentî de connettise trammite un socket Unix.", - "config-db-host-oracle": "TNS do database:", - "config-db-host-oracle-help": "Inseisci un vallido [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; un file tnsnames.ora o dev'ese vixibbile a questa installaçion.
Se ti t'adoeuvi a libraia cliente 10g o ciù reçente ti poeu ascì doeuviâ o mettodo de denominaçion [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identiffica questo wiki", "config-db-name": "Nomme do database:", "config-db-name-help": "Çerni un nomme ch'o l'identiffiche o to wiki.\nO no deve contegnî de spaççi.\n\nSe ti doeuvi un web hosting condiviso, o to hosting provider o te fornisce un speciffico nomme de database da doeuviâ, opû o ti consentiâ de creâ o database trammite un panello de controllo.", - "config-db-name-oracle": "Schema do database:", - "config-db-account-oracle-warn": "Gh'è trei scenarri supportæ pe instalâ l'Oracle comme database de backend:\n\nSe t'oeu creâ 'n'utença de database comme parte do processo d'instalaçion, fornisci un account con rollo SYSDBA comme utença de database pe l'instalaçion e speciffica e credençiæ vosciue pe l'utença d'accesso web, sedonque l'è poscibbile creâ manoalmente l'utença d'accesso web e fornî solo quell'account (s'o g'ha e aotorizaçioin necessaie pe creâ i ogetti do schema) ò fornî doe utençe despæge, un-a co-i permissi de creaçion e un-a pe l'accesso web.\n\nO Script pe creâ un'utença co-e aotorizaçioin necessaie o se troeuva inta directory \"maintenance/oracle/\" de questa instalaçion. Tegnit'amente che l'uzo de 'n'utença con restriçioin o dizabilitiâ tutte e fonçionalitæ de manutençion con l'account predefinio.", "config-db-install-account": "Account utente pe l'instalaçion", "config-db-username": "Nomme utente do database:", "config-db-password": "Password do database:", @@ -105,34 +101,22 @@ "config-pg-test-error": "Imposcibbile conettise a-o database '''$1''': $2", "config-sqlite-dir": "Cartella dæti de SQLite:", "config-sqlite-dir-help": "SQLite o memorizza tutti i dæti inte 'n unnico file.\n\nA directory che t'indichiæ a dev'ese scrivibile da-o serviou web durante l'instalaçion.\n\nA dev'ese non acescibbile via web, l'è pe questo che no a mettemmo donde gh'è i file PHP.\n\nL'instalou o ghe scriviâ insemme un file .htaccess, ma se o tentativo o falisse quarcun poriæ avei accesso a-o database sgroeuzzo.\nQuesto o l'includde di dæti utente sgroeuzzi (adressi, password çiffræ) coscì comme de vercsioin eliminæ e atri dæti a accesso limitou da wiki.\n\nConsciddera a-a dreitua l'oportunitæ d'alugâ o database da quarch'atra parte, prezempio in /var/lib/mediawiki/tuowiki.", - "config-oracle-def-ts": "Tablespace pe difetto:", - "config-oracle-temp-ts": "Tablespace tempoannio:", "config-type-mysql": "MariaDB, MySQL ò compatibbile", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki o supporta i seguenti scistemi de database:\n\n$1\n\nSe fra quelli elencæ chì de sotta no ti veddi o scistema de database che ti voriesci doeuviâ, segui e instruçioin inganciæ de d'ato pe abilitâ o supporto.", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] a l'è a primma scelta pe MediaWiki e a l'è quella megio suportâ. MediaWiki a fonçion-a ascì con [{{int:version-db-mariadb-url}} MariaDB] e [{{int:version-db-percona-url}} Percona Server], che son compatibbili con MySQL.([https://www.php.net/manual/en/mysqli.installation.php Comme compilâ PHP con suporto MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] o l'è un popolare scistema de database open source comme alternativa a MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Comme compilâ PHP con suporto PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] o l'è un scistema de database leggio, ch'o l'è suportou molto ben. ([http://www.php.net/manual/en/pdo.installation.php Comme compilâ PHP con suporto SQLite], o l'utilizza PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] o l'è un database de un'impreiza comerciâ. ([http://www.php.net/manual/en/oci8.installation.php Comme compilâ PHP con suporto OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] o l'è un database de un'impreiza commerciâ per Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Comme compilâ PHP con supporto SQLSRV])", "config-header-mysql": "Impostaçioin MySQL", "config-header-postgres": "Impostaçioin PostgreSQL", "config-header-sqlite": "Impostaçioin SQLite", - "config-header-oracle": "Impostaçioin Oracle", - "config-header-mssql": "Impostaçioin do Microsoft SQL Server", "config-invalid-db-type": "Tipo de database non vallido", "config-missing-db-name": "Ti g'hæ da mettighe un valô pe \"{{int:config-db-name}}\".", "config-missing-db-host": "Ti g'hæ da mettighe un valô pe \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "L'è necessaio inmettere un valô pe \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "TNS database \"$1\" non vallido.\nAdoeuvia \"TNS Name\" ò 'na stringa \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods]).", "config-invalid-db-name": "Nomme de database \"$1\" non vallido.\nAdoeuvia solo che di caratteri ASCII comme lettie (a-z, A-Z), nummeri (0-9), sottoliniatua (_) e trattin (-).", "config-invalid-db-prefix": "Prefisso database \"$1\" non vallido.\nChe ti doeuvi solo di caratteri ASCII comme lettie (a-z, A-Z), nummeri (0-9), sottoliniatua (_) e trattin (-).", "config-connection-error": "$1.\n\nControlla l'host, o nomme utente e a password, e proeuva torna.", "config-invalid-schema": "Schema MediaWiki \"$1\" non vallido.\nChe ti doeuvi solo lettie ASCII (a-z, A-Z), nummeri (0-9) ò caratteri de sottoliniatua (_).", - "config-db-sys-create-oracle": "O programma d'instalaçion o suporta solo l'utilizzo de 'n account SYSDBA pe-a creaçion de 'n noeuvo account.", - "config-db-sys-user-exists-oracle": "L'utença \"$1\" a l'existe za. SYSDBA o poeu vese doeuviou solo che pe-a creaçion de 'na noeuva utença!", "config-postgres-old": "Ghe voeu MySQL $1 ò 'na verscion succesciva. Ti ti g'hæ a $2.", - "config-mssql-old": "Ghe voeu Microsoft SQL Server $1 ò succescivo. Ti ti g'hæ a verscion $2.", "config-sqlite-name-help": "Çerni un nomme ch'o l'identiffiche a to wiki.\nNo doeuviâ spaÇçi ò trattin.\nQuesto o serviâ pe-o nomme do file di dæti SQLite.", "config-sqlite-parent-unwritable-group": "No se poeu creâ a directory dæti $1, percose a directory supeiô $2 a no l'è scrivibbile da-o webserver.\n\nO programma d'instalaÇion o l'ha determinou l'utente con chi o serviou web o l'è in esecuçion.\nDagghe a poscibilitæ de scrive inta directory $3 pe continoâ.\nInsce un scistema Unix/Linux fanni:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "No se poeu creâ a directory dæti $1, percose a directory supeiô $2 a no l'è scrivibbile da-o webserver.\n\nO programma d'instalaçion o no l'ha posciuo determinâ l'utente con chi o serviou web o l'è in esecuçion.\nRendi a directory $3 scrivibbile globalmente, da esso (e da atri) pe continoâ.\nInsce un scistema Unix/Linux fanni:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -156,11 +140,6 @@ "config-mysql-engine": "Motô d'archiviaçion:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "InnoDB o l'è quæxi sempre a megio opçion, in quante o g'ha 'n bon supporto da concorença.\n\nMyISAM o poriæ vese ciu veloçe inte installaçioin mono-utente ò in sola-lettua.\nI database MyISAM tendan a dannezâse ciu soventi di database InnoDB.", - "config-mssql-auth": "Tipo d'aotenticaçion:", - "config-mssql-install-auth": "Seleçion-a o tipo d'aotenticaçion ch'o saiâ doeuviou pe conettise a-o database durante o processo de instalaçion.\nSe ti seleçion-i \"{{int:config-mssql-windowsauth}}\", saiâ doeuviou e credençiæ de quæ se segge utente segge aproeuv'a fâ giâ o serviou web.", - "config-mssql-web-auth": "Seleçion-a o tipo d'aotenticaçion che o serviou web o doeuviâ pe conettise a-o database. \nSe ti seleçion-i \"{{int:config-mssql-windowsauth}}\", saiâ doeuviou e credençiæ de quæ se segge utente segge aproeuv'a fâ giâ o serviou web.", - "config-mssql-sqlauth": "Aotenticaçion de SQL Server", - "config-mssql-windowsauth": "Aotenticaçion de Windows", "config-site-name": "Nomme da wiki:", "config-site-name-help": "Questo saiâ vixualizou inta bara do tittolo do navegatô e in atri varri recanti.", "config-site-name-blank": "Inseisci o nomme de 'n scito.", diff --git a/includes/installer/i18n/lki.json b/includes/installer/i18n/lki.json index a637c097bf..6d06e259dd 100644 --- a/includes/installer/i18n/lki.json +++ b/includes/installer/i18n/lki.json @@ -62,7 +62,6 @@ "config-memory-bad": "'''هشدار:''' PHP's memory_limit نسخهٔ $1 است.\nاین ممکن است خیلی پایین باشد.\nممکن است نصب با مشکل رو‌به‌رو شود.", "config-db-type": "نوع پایگاه اطلاعات:", "config-db-host": "میزبان پایگاه اطلاعات:", - "config-db-host-oracle": "ای ویکیۀ شناسایی کۀ.", "config-db-name": "نام پایگاه اطلاعات:", "config-upgrade-done": "تکمیل ارتقاء.\nاکنون شما می‌توانید [$1 start using your wiki].\nاگر می‌خواهید پوشهٔ LocalSettings.php را احیا کنید،دکمهٔ زیر را کلیک کنید.\nاین ''' توصیه نمی‌شود ''' مگر اینکه با ویکی خود مشکل داشته باشید.", "config-site-name-blank": "نام سایتئ وارد کۀن.", diff --git a/includes/installer/i18n/lt.json b/includes/installer/i18n/lt.json index a4c524b310..8cb1ae7aaa 100644 --- a/includes/installer/i18n/lt.json +++ b/includes/installer/i18n/lt.json @@ -64,10 +64,8 @@ "config-using-uri": "Naudojamas serverio URL „$1$2“.", "config-db-type": "Duomenų bazės tipas:", "config-db-host": "Duomenų bazės serveris:", - "config-db-host-oracle": "Duomenų bazės TNS:", "config-db-wiki-settings": "Identifikuoti šią viki", "config-db-name": "Duomenų bazės pavadinimas:", - "config-db-name-oracle": "Duomenų bazės schema:", "config-db-install-account": "Vartotojo paskyra diegimui", "config-db-username": "Duomenų bazės vartotojo vardas:", "config-db-password": "Duomenų bazės slaptažodis:", @@ -78,19 +76,13 @@ "config-db-schema": "MediaWiki schema:", "config-pg-test-error": "Negalima prisijungti prie duomenų bazės $1: $2", "config-sqlite-dir": "SQLite duomenų katalogas:", - "config-oracle-def-ts": "Numatytoji lentelių sritis:", - "config-oracle-temp-ts": "Laikina lentelių sritis:", "config-type-mysql": "MySQL (arba suderinama)", - "config-type-mssql": "Microsoft SQL serveris", "config-header-mysql": "MySQL nustatymai", "config-header-postgres": "PostgreSQL nustatymai", "config-header-sqlite": "SQLite nustatymai", - "config-header-oracle": "Oracle nustatymai", - "config-header-mssql": "„Microsoft“ SQL serverio nustatymai", "config-invalid-db-type": "Neteisingas duomenų bazės tipas", "config-missing-db-name": "Privalote įvesti „{{int:config-db-name}}“ reikšmę.", "config-missing-db-host": "Privalote įvesti „{{int:config-db-host}}“ reikšmę.", - "config-missing-db-server-oracle": "Privalote įvesti „{{int:config-db-host-oracle}}“ reikšmę.", "config-postgres-old": "PostgreSQL $1 ar vėlesnė yra reikalinga. Jūs turite $2.", "config-sqlite-cant-create-db": "Nepavyko sukurti duomenų bazės failo $1.", "config-regenerate": "Pergeneruoti LocalSettings.php →", @@ -99,9 +91,6 @@ "config-db-web-create": "Sukurti paskyrą, jeigu jos nėra", "config-mysql-engine": "Saugojimo variklis:", "config-mysql-innodb": "InnoDB", - "config-mssql-auth": "Autentifikavimo tipas:", - "config-mssql-sqlauth": "SQL Serverio autentifikavimas", - "config-mssql-windowsauth": "Windows autentifikavimas", "config-site-name": "Viki pavadinimas:", "config-site-name-blank": "Įveskite svetainės pavadinimą.", "config-project-namespace": "Projekto vardų sritis:", diff --git a/includes/installer/i18n/lv.json b/includes/installer/i18n/lv.json index 675e3db1b5..3546be0c2a 100644 --- a/includes/installer/i18n/lv.json +++ b/includes/installer/i18n/lv.json @@ -29,7 +29,6 @@ "config-env-hhvm": "HHVM $1 ir uzstādīts.", "config-apcu": "[https://www.php.net/apcu APCu] ir uzstādīts", "config-diff3-bad": "GNU diff3 nav atrasts.", - "config-db-host-oracle": "Datubāzes TNS:", "config-db-name": "Datubāzes nosaukums:", "config-db-username": "Datubāzes lietotājvārds:", "config-db-password": "Datubāzes parole:", @@ -40,10 +39,7 @@ "config-header-mysql": "MySQL iestatījumi", "config-header-postgres": "PostgreSQL iestatījumi", "config-header-sqlite": "SQLite iestatījumi", - "config-header-oracle": "Oracle iestatījumi", - "config-header-mssql": "Microsoft SQL servera iestatījumi", "config-mysql-innodb": "InnoDB", - "config-mssql-windowsauth": "Windows Autentifikācija", "config-ns-generic": "Projekts", "config-ns-site-name": "Tāds pats kā viki nosaukums: $1", "config-ns-other": "Cits (jānorāda)", diff --git a/includes/installer/i18n/mg.json b/includes/installer/i18n/mg.json index a3d824bec3..820b9b0fce 100644 --- a/includes/installer/i18n/mg.json +++ b/includes/installer/i18n/mg.json @@ -48,7 +48,6 @@ "config-db-type": "Karazana banky angona:", "config-db-host": "Anaran'ny lohamilin'ny banky angona:", "config-db-host-help": "Raha lohamila hafa ny lohamilin'ny banky angona, dia atsofohy eto ny anaran'ilay lohamilina na ny adiresy IP-ny.\n\nRaha mampiasa fampiantranoana iombonana ianao dia tokony hanome anao ny anaran-dohamilina izy ao amin'ny toromariny.\n\nRaha mametraka amin'ny lohamilina Windows ianao sady mampiasa MySQL, dia mety tsy mandeha ny anaran-dohamilina \"localhost\". Raha tsy mandeha ilay izy dia \"127.0.0.1\" no atao adiresy IP an-toerana.\n\nRaha mampiasa PostgreSQL ianao, dia avelaho ho fotsy ity saha ity ahafahana mifandray amin'ny alalan'ny socket Unix.", - "config-db-host-oracle": "TNS an'ny banky angona:", "config-db-username": "Anaram-pikamban'ny banky angona :", "config-db-password": "Tenimiafin'ny banky angona :", "config-db-prefix": "Tovom-banky angona:", @@ -56,8 +55,6 @@ "config-header-mysql": "Parametatr'i MySQL", "config-header-postgres": "Parametatra PostgreSQL", "config-header-sqlite": "Parametatr'i SQLite", - "config-header-oracle": "Parametatr'i Oracle", - "config-header-mssql": "Parametatry ny lohamilina Microsoft SQL Server", "config-invalid-db-type": "Karazana banky angona tsy ekena.", "config-mysql-innodb": "innoDB", "config-ns-generic": "Tetikasa", diff --git a/includes/installer/i18n/mk.json b/includes/installer/i18n/mk.json index e6526837a8..c5b9932d39 100644 --- a/includes/installer/i18n/mk.json +++ b/includes/installer/i18n/mk.json @@ -88,13 +88,9 @@ "config-db-type": "Тип на база:", "config-db-host": "Домаќин на базата:", "config-db-host-help": "Ако вашата база е на друг опслужувач, тогаш тука внесете го името на домаќинот или IP-адресата.\n\nАко користите заедничко (споделено) вдомување, тогаш вашиот вдомител треба да го наведе точното име на домаќинот во неговата документација.\n\nАко користите MySQL, можноста „localhost“ може да не функционира за опслужувачкото име. Во тој случај, обидете се со внесување на „127.0.0.1“ како месна IP-адреса.\n\nАко користите PostgreSQL, оставете го полево празно за да се поврзете преку Unix-приклучок.", - "config-db-host-oracle": "TNS на базата:", - "config-db-host-oracle-help": "Внесете важечко [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm месно име за поврзување]. На оваа воспоставка мора да ѝ биде видлива податотеката tnsnames.ora.
Ако користите клиентски библиотеки 10g или понови, тогаш можете да го користите и методот на иметнување на [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Идентификувај го викиво", "config-db-name": "Име на базата (без цртички):", "config-db-name-help": "Одберете име што ќе го претставува вашето вики.\nИмето не смее да содржи празни места.\n\nАко користите заедничко (споделено) вдомување, тогаш вашиот вдомител ќе ви даде конкретно име на база за користење, или пак ќе ви даде да создавате бази преку управувачницата.", - "config-db-name-oracle": "Шема на базата:", - "config-db-account-oracle-warn": "Постојат три поддржани сценарија за воспоставка на Oracle како базен услужник:\n\nАко сакате да создадете сметка на базата како дел од постапката за воспоставка, наведете сметка со SYSDBA-улога како сметка за базата што ќе се воспостави и наведете ги саканите податоци за сметката за мрежен пристап. Во друг случај, можете да создадете сметка за мрежен пристап рачно и да ја наведете само таа сметка (ако има дозволи за создавање на шематски објекти) или пак да наведете две различни сметки, една со привилегии за создавање, а друга (ограничена) за мрежен пристап.\n\nСкриптата за создавање сметка со задолжителни привилегии ќе ја најдете во папката „maintenance/oracle/“ од оваа воспоставка. Имајте на ум дека ако користите ограничена сметка ќе ги оневозможите сите функции за одржување со основната сметка.", "config-db-install-account": "Корисничка смета за воспоставка", "config-db-username": "Корисничко име за базата:", "config-db-password": "Лозинка за базата:", @@ -113,37 +109,24 @@ "config-pg-test-error": "Не можам да се поврзам со базата $1: $2", "config-sqlite-dir": "Папка на SQLite-податоци:", "config-sqlite-dir-help": "SQLite ги складира сите податоци во една податотека.\n\nПапката што ќе ја наведете мора да е запислива од мрежниот опслужувач во текот на воспоставката.\n\nТаа '''не''' смее да биде достапна преку семрежјето, и затоа не ја ставаме кајшто ви се наоѓаат PHP-податотеките.\n\nВоспоставувачот воедно ќе создаде податотека .htaccess, но ако таа не функционира како што треба, тогаш некој ќе може да ви влезе во вашата необработена (сирова) база на податоци.\nТука спаѓаат необработени кориснички податоци (е-поштенски адреси, хеширани лозинки) како и избришани преработки и други податоци за викито до кои се има ограничен пристап.\n\nСе препорачува целата база да ја сместите некаде, како на пр. /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Стандарден таблеарен простор:", - "config-oracle-temp-ts": "Привремен табеларен простор:", "config-type-mysql": "MariaDB, MySQL или складно", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "МедијаВики ги поддржува следниве системи на бази на податоци:\n\n$1\n\nАко системот што сакате да го користите не е наведен подолу, тогаш проследете ја горенаведената врска со инструкции за да овозможите поддршка за тој систем.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] е главната цел на МедијаВики и најдобро е поддржан. МедијаВики работи и со [{{int:version-db-mysql-url}} MySQL] и [{{int:version-db-percona-url}} Percona], кои се складни со MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Како да срочите PHP со поддршка за MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] е популарен систем на бази на податоци со отворен код кој претставува алтернатива на MySQL ([https://www.php.net/manual/en/pgsql.installation.php како да составите PHP со поддршка за PostgreSQL]). ([https://www.php.net/manual/en/pgsql.installation.php Како да срочите PHP со поддршка за PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] е лесен систем за бази на податоци кој е многу добро поддржан. ([https://www.php.net/manual/en/pdo.installation.php Како да составите PHP со поддршка за SQLite], користи PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] е база на податоци на комерцијално претпријатие. ([https://www.php.net/manual/en/oci8.installation.php Како да составите PHP со поддршка за OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] е база на податоци на комерцијално претпријатиe за Windows ([https://www.php.net/manual/en/sqlsrv.installation.php How to compile PHP with SQLSRV поддршка])", "config-header-mysql": "Нагодувања на MariaDB/MySQL", "config-header-postgres": "Нагодувања на PostgreSQL", "config-header-sqlite": "Нагодувања на SQLite", - "config-header-oracle": "Нагодувања на Oracle", - "config-header-mssql": "Нагодувања за Microsoft SQL Server", "config-invalid-db-type": "Неважечки тип на база", "config-missing-db-name": "Мора да внесете значење за параметарот „{{int:config-db-name}}“.", "config-missing-db-host": "Мора да внесете вредност за „{{int:config-db-host}}“.", - "config-missing-db-server-oracle": "Мора да внесете вредност за „{{int:config-db-host-oracle}}“.", - "config-invalid-db-server-oracle": "Неважечки TNS „$1“.\nКористете или „TNS Name“ или низата „Easy Connect“ ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Методи на именување за Oracle])", "config-invalid-db-name": "Неважечко име на базата „$1“.\nКористете само ASCII-букви (a-z, A-Z), бројки (0-9), долни црти (_) и цртички (-).", "config-invalid-db-prefix": "Неважечка претставка за базата „$1“.\nКористете само ASCII-букви (a-z, A-Z), бројки (0-9), долни црти (_) и цртички (-).", "config-connection-error": "$1.\n\nПроверете го долунаведениот домаќин, корисничко име и лозинка и обидете се повторно. Ако користите „localhost“ како домаќин на базата, заменете го со „127.0.0.1“ (или обратно).", "config-invalid-schema": "Неважечка шема за МедијаВики „$1“.\nКористете само букви, бројки и долни црти.", - "config-db-sys-create-oracle": "Воспоставувачот поддржува само употреба на SYSDBA-сметка за создавање на нова сметка.", - "config-db-sys-user-exists-oracle": "Корисничката сметка „$1“ веќе постои. SYSDBA служи само за создавање на нова сметка!", "config-postgres-old": "Се бара PostgreSQL $1 или поново, а вие имате $2.", - "config-mssql-old": "Се бара Microsoft SQL Server $1 или понова верзија. Вие имате $2.", "config-sqlite-name-help": "Одберете име кое ќе го претставува вашето вики.\nНе користете празни простори и црти.\nОва ќе се користи за податотечното име на SQLite-податоците.", "config-sqlite-parent-unwritable-group": "Не можам да ја создадам папката $1 бидејќи мрежниот опслужувач не може да запише во матичната папка $2.\n\nВоспоставувачот го утврди корисникот под кој работи вашиот мрежен опслужувач.\nЗа да продолжите, наместете да може да запишува во папката $3.\nНа Unix/Linux систем направете го следново:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Не можам да ја создадам папката $1 бидејќи мрежниот опслужувач не може да запише во матичната папка $2.\n\nВоспоставувачот не можеше го утврди корисникот под кој работи вашиот мрежен опслужувач.\nЗа да продолжите, наместете тој (и други!) да може глобално да запишува во папката $3\nНа Unix/Linux систем направете го следново:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -168,11 +151,6 @@ "config-mysql-engine": "Складишен погон:", "config-mysql-innodb": "InnoDB (препорачано)", "config-mysql-engine-help": "'''InnoDB''' речиси секогаш е најдобар избор, бидејќи има добра поддршка за едновременост.\n\n'''MyISAM''' може да е побрз кај воспоставките наменети за само еден корисник или незаписни воспоставки (само читање).\nБазите на податоци од MyISAM почесто се расипуваат од базите на InnoDB.", - "config-mssql-auth": "Тип на заверка:", - "config-mssql-install-auth": "Изберете го типот на заверка што ќе се користи за поврзување со базата на податоци во текот на воспоставката.\nАко изберете „{{int:config-mssql-windowsauth}}“, ќе се користат најавните податоци или корисникот како кој работи мрежниот опслужувач.", - "config-mssql-web-auth": "Изберете го типот на заверка што мрежниот послужувач ќе го користи за поврзување со опслужувачот на базата во текот на редовната работа на викито.\nАко изберете „{{int:config-mssql-windowsauth}}“, ќе се користат најавните податоци или корисникот како кој работи мрежниот опслужувач.", - "config-mssql-sqlauth": "Заверка за SQL Server", - "config-mssql-windowsauth": "Заверка за Windows", "config-site-name": "Име на викито:", "config-site-name-help": "Ова ќе се појавува во заглавната лента на прелистувачот и на разни други места.", "config-site-name-blank": "Внесете име на мрежното место.", diff --git a/includes/installer/i18n/ml.json b/includes/installer/i18n/ml.json index c1bbec0265..8b506252bf 100644 --- a/includes/installer/i18n/ml.json +++ b/includes/installer/i18n/ml.json @@ -42,7 +42,6 @@ "config-db-type": "ഡേറ്റാബേസ് തരം:", "config-db-host": "ഡേറ്റാബേസ് ഹോസ്റ്റ്:", "config-db-name": "ഡേറ്റാബേസിന്റെ പേര്:", - "config-db-name-oracle": "ഡേറ്റാബേസ് സ്കീമ:", "config-db-install-account": "ഇൻസ്റ്റലേഷനുള്ള ഉപയോക്തൃ അംഗത്വം", "config-db-username": "ഡേറ്റാബേസ് ഉപയോക്തൃനാമം:", "config-db-password": "ഡേറ്റാബേസ് രഹസ്യവാക്ക്:", diff --git a/includes/installer/i18n/mr.json b/includes/installer/i18n/mr.json index 9f31fda72b..a1b7b37471 100644 --- a/includes/installer/i18n/mr.json +++ b/includes/installer/i18n/mr.json @@ -59,24 +59,15 @@ "config-db-type": "डाटाबेसचा प्रकार:", "config-db-host": "डाटाबेसचा यजमान:", "config-db-name": "डाटाबेसचे नाव:", - "config-db-name-oracle": "डाटाबेस आकृतीबंध:", "config-db-install-account": "उभारणीसाठी सदस्य खाते", "config-db-username": "डाटाबेसवरील सदस्यनाव:", "config-db-password": "डाटाबेसवरील परवलीचा शब्द:", "config-db-prefix": "डाटाबेस सारणी उपसर्ग:", "config-db-port": "डाटाबेस द्वार:", "config-pg-test-error": "विदागाराशी अनुबंधन करता येत नाही $1: $2", - "config-type-mssql": "मायक्रोसॉफ्ट एसक्युएल सर्व्हर", - "config-header-mssql": "मायक्रोसॉफ्ट एसक्युएल सर्व्हर मांडणावळ", "config-invalid-db-type": "डाटाबेसचा अवैध प्रकार.", "config-connection-error": "$1.\n\nयजमान,सदस्यनाव व परवलीचा शब्द तपासा व पुन्हा प्रयत्न करा.", - "config-mssql-old": "मायक्रोसॉफ्ट एसक्युएल सर्व्हर $1 किंवा त्यानंतरची आवृत्ती हवी. आपणापाशी $2 आहे.", "config-upgrade-done-no-regenerate": "दर्जोन्नती पूर्ण.\n\nआपण आता [$1 आपला विकिचा वापर करु शकता].", - "config-mssql-auth": "अधिप्रमाणन प्रकार:", - "config-mssql-install-auth": "उभारणीच्या(इन्स्टॉलेशन) प्रक्रियेदरम्यान,'अधिप्रमाणन प्रकार'( ऑथेंटीकेशन टाईप) निवडा, ज्याचा वापर डाटाबेसशी अनुबंधनात करण्यात येईल.जर आपण \"{{int:config-mssql-windowsauth}} निवडले तर,ज्याकोणत्याही सदस्याची अधिकारपत्रे(क्रेडेंटियल्स) वेबसर्व्हरवर सुरू असतील,तशीच वापरल्या जातील.", - "config-mssql-web-auth": "'अधिप्रमाणन प्रकार'( ऑथेंटीकेशन टाईप) निवडा, ज्यास,या विकिचे सामान्य चालनादरम्यान, वेब सर्व्हर हा डाटाबेसशी अनुबंधन करण्यास वापरेल.जर आपण\"{{int:config-mssql-windowsauth}}\" निवडले तर,ज्याकोणत्याही सदस्याची अधिकारपत्रे(क्रेडेंटियल्स) वेबसर्व्हरवर सुरू असतील,तशीच वापरल्या जातील.", - "config-mssql-sqlauth": "एसक्युएल सर्व्हर अधिप्रमाणन", - "config-mssql-windowsauth": "विंडोजचे अधिप्रमाणन", "config-site-name": "विकिचे नाव:", "config-site-name-help": "हे न्याहाळकाच्या शीर्षक पट्टीत व इतर ठिकाणीही दिसेल .", "config-site-name-blank": "संकेतस्थळाचे नाव टाका.", diff --git a/includes/installer/i18n/ms.json b/includes/installer/i18n/ms.json index 1163486095..6e1aa7171e 100644 --- a/includes/installer/i18n/ms.json +++ b/includes/installer/i18n/ms.json @@ -70,9 +70,7 @@ "config-no-cli-uploads-check": "Amaran: Direktori asali anda untuk muat naikan ($1) belum diperiksa untuk kerentanan\nkepada pelaksanaan skrip yang menyeleweng sewaktu pemasangan CLI.", "config-db-type": "Jenis pangkalan data:", "config-db-host": "Hos pangkalan data:", - "config-db-host-oracle": "TNS pangkalan data:", "config-db-name": "Nama pangkalan data:", - "config-db-name-oracle": "Skema pangkalan data:", "config-db-username": "Nama pengguna pangkalan data:", "config-db-password": "Kata laluan pangkalan data:", "config-db-prefix": "Awalan jadual pangkalan data:", @@ -80,15 +78,10 @@ "config-db-schema": "Skema untuk MediaWiki:", "config-pg-test-error": "Tidak boleh bersambung dengan pangkalan data $1: $2", "config-sqlite-dir": "Direktori data SQLite:", - "config-oracle-def-ts": "Ruang jadual lalai:", - "config-oracle-temp-ts": "Ruang jadual sementara:", "config-type-mysql": "MySQL (atau yang serasi)", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "Keutamaan MySQL", "config-header-postgres": "Keutamaan PostgreSQL", "config-header-sqlite": "Keutamaan SQLite", - "config-header-oracle": "Keutamaan Oracle", - "config-header-mssql": "Tetapan Microsoft SQL Server", "config-invalid-db-type": "Jenis pangkalan data tidak sah", "config-can-upgrade": "Terdapat jadual MediaWiki dalam pangkalan data ini. Untuk menaik tarafnya kepada MediaWiki $1, klik Teruskan.", "config-unknown-collation": "Amaran: Pangkalan data sedang menggunakan kolasi yang tidak dikenali.", @@ -96,7 +89,6 @@ "config-db-web-create": "Ciptakan akaun jika belum wujud", "config-mysql-engine": "Enjin storan:", "config-mysql-innodb": "InnoDB", - "config-mssql-auth": "Jenis pengesahan:", "config-site-name": "Nama wiki:", "config-site-name-help": "Ini akan dipaparkan pada bar tajuk perisian pelayar dan tempat-tempat lain yang berkenaan.", "config-site-name-blank": "Isikan nama tapak.", diff --git a/includes/installer/i18n/mzn.json b/includes/installer/i18n/mzn.json index 5662f0a319..5b4f2d2f6d 100644 --- a/includes/installer/i18n/mzn.json +++ b/includes/installer/i18n/mzn.json @@ -35,7 +35,6 @@ "config-apcu": "[https://www.php.net/apcu APCu] نصب بیه.", "config-wincache": "[https://www.iis.net/downloads/microsoft/wincache-extension WinCache] نصب بیه.", "config-diff3-bad": "GNU diff3 پیدا نیه.", - "config-mssql-auth": "نوع تأیید:", "config-ns-generic": "پروژه", "config-ns-other": "دیگه ( تعیین هاکنین)", "config-ns-other-default": "مه‌ویکی", diff --git a/includes/installer/i18n/nap.json b/includes/installer/i18n/nap.json index 5379e8da5f..03e0e99656 100644 --- a/includes/installer/i18n/nap.json +++ b/includes/installer/i18n/nap.json @@ -83,13 +83,9 @@ "config-db-type": "Tipo 'e database:", "config-db-host": "Host d' 'o database:", "config-db-host-help": "Si 'o server database vuosto stà mpizzato dint' 'a nu server differente, miette 'o nomme d' 'o host o l'indirizzo IP sujo.\n\nSi state ausanno nu servizio spartuto web hosting, 'aggenzia 'e hosting v'avess'a dà 'o nomme buono 'e nomme host dint' 'a documentaziona suoja.\n\nSi state installanno chisto dint'a nu server Windows cu MySQL, ausanno \"localhost\" può darse ca nun funziona p' 'o nomme server. Si chisto nun funziona, mettite \"127.0.0.1\" p' 'o ndirizzo locale vuosto.\n\nSi state ausanno PostgreSQL, lassate abbacante stu campo pe' v'accucchià cu nu socket Unix.", - "config-db-host-oracle": "TNS d' 'o database:", - "config-db-host-oracle-help": "Mettite nu valido [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Nomme 'e conessione lucale]; nu file \"tnsnames.ora\" adda essere vesibbele dint'a sta installazione.
Si state ausanno 'a libbreria cliente 10g o cchiù ricente putite pure ausà 'o metodo 'e denominazione [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifica stu wiki", "config-db-name": "Nomme d' 'o database:", "config-db-name-help": "Sciglite nu nomme ca identificasse 'a wiki vosta.\nNun avess'a cuntenè spazie.\n\nSi ausate nu web hosting spartuto, 'o furnitore d' 'o hosting v'avesse 'a specificà nu nomme 'e database specifico pe' ve permettere 'e crià database pe' bbìa 'e nu pannello 'e cuntrollo.", - "config-db-name-oracle": "Schema d' 'o database:", - "config-db-account-oracle-warn": "Ce stanno tre scenarie suppurtate p' 'a installazione d'Oracle comme database 'e backend:\n\nSi vulite crià n'utenza 'e database comme parte d' 'o prucesso 'e installazione, dàte nu cunto c' 'o ruolo SYSDBA comme utenza d' 'o database pe ne fà installazione e specificate 'e credenziale vulute pe' ne fà l'utenza d'acciesso web, sinò è possibbele crià manualmente l'utenza d'accesso web e dà surtanto chillu cunto (si tenite autorizzaziune neccessarie pe' crià oggette 'e stu schema) po dà dduje utenze divierze, una ch' 'e permesse 'e criazione e n'ata pe ne putè trasì ô web.\n\n'O script p' 'a criazione 'e n'utenza cu tutte st'autorizzaziune neccessarie 'o putite truvà dint' 'a cartella \"maintenance/oracle\" 'e sta installazione. Tenite a mmente che l'uso 'e n'utenza cu sti restriziune stutarrà tutt' 'e funziune 'e manutenzione c' 'o cunto predefinito.", "config-db-install-account": "Cunto utente pe' l'installazione", "config-db-username": "Nomme utente p' 'o database:", "config-db-password": "Password d' 'o database:", @@ -108,34 +104,22 @@ "config-pg-test-error": "Nun se può connettà a 'o database $1: $2", "config-sqlite-dir": "Cartella 'e data 'e SQLite:", "config-sqlite-dir-help": "SQLite astipa tutte 'e date dint'a n'uneco file.\n\n'A cartella ca starraje a innecà adda essere scrivibbele d' 'o server webe pe' tramente ca sta l'istallazione.\n\nAvess'a essere nun trasibbele via web, è pecchesto ca nun se sta mettenno addò stanno 'e file PHP.\n\nL'installatore scriverrà nzieme a chesta nu file .htaccess, ma si 'o tentativo scassasse, coccheruno putesse tenè acciesso dint' 'o database ncruro.\nChesto pure cunzidera 'e date ncruro 'e ll'utente (indirizze, password cifrate) accussì comme 'e verziune luvate e ati dati d'accesso limmetato dint' 'o wiki.\n\nCunzidera ll'opportunità 'e sistimà ô tiempo 'o database 'a n'ata parte, p'esempio int'a /var/lib/mediawiki/tuowiki.", - "config-oracle-def-ts": "Tablespace 'e default:", - "config-oracle-temp-ts": "Tablespace temporaneo:", "config-type-mysql": "MariaDB, MySQL o compatibbele", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki supporta 'e sisteme 'e database ccà abbascio:\n\n$1\n\nSi nfra chiste ccà nun vedite 'o sistema 'e database ca vulite ausà, allora avite liegge 'e instruziune ccà ncoppa pe' ne dà supporto.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] è 'a configurazione cchiù mmeglio p' 'o MediaWiki e è chilla meglio suppurtata. MediaWiki può faticà pure cu' [{{int:version-db-mariadb-url}} MariaDB] e [{{int:version-db-percona-url}} Percona Server], ca fossero MariaDB cumpatibbele. ([https://www.php.net/manual/en/mysqli.installation.php Comme s'adda fà pe' cumpilà PHP cu suppuorto MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] è nu sistema canusciuto 'e database open source ca fosse n'alternativa a MySQL.\n([https://www.php.net/manual/en/pgsql.installation.php Comme s'avess'a cumpilà PHP cu suppuorto PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] è nu sistema 'e database leggero, ca fosse assaje buono suppurtato.\n([https://www.php.net/manual/en/pdo.installation.php Comme cumpilà PHP cu suppuorto SQLite], aùsa PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] è nu database 'e na fraveca commerciale. ([https://www.php.net/manual/en/oci8.installation.php Comme cumpilà PHP cu suppuorto OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] è nu database 'e na fraveca commerciale p' 'o Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Comme cumpilà PHP cu suppuorto SQLSRV])", "config-header-mysql": "Mpustaziune MariaDB/MySQL", "config-header-postgres": "Mpustaziune PostgreSQL", "config-header-sqlite": "Mpustaziune SQLite", - "config-header-oracle": "Mpustaziune Oracle", - "config-header-mssql": "Mpustaziune 'e Microsoft SQL Server", "config-invalid-db-type": "'O tipo 'e database nun è buono.", "config-missing-db-name": "Avita miette nu valore p' 'o \"{{int:config-db-name}}\"", "config-missing-db-host": "Avita miette nu valore p' 'o \"{{int:config-db-host}}\"", - "config-missing-db-server-oracle": "Avita miette nu valore p' 'o \"{{int:config-db-host-oracle}}\"", - "config-invalid-db-server-oracle": "'O database 'e TNS \"$1\" nun è buono.\nAusate 'o \"TNS Name\" o na catena d' \"Easy Connect\"([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Metude 'e Nommena Oracle]).", "config-invalid-db-name": "Nomme 'e database \"$1\" nun valido.\nAúsa surtanto carattere ASCII comme lettere (a-z, A-Z), nummere (0-9), sottolineatura (_) e trattine (-).", "config-invalid-db-prefix": "Prefisso database \"$1\" nun valido.\nAúsa surtanto carattere ASCII comme lettere (a-z, A-Z), nummere (0-9), sottolineatura (_) e trattine (-).", "config-connection-error": "$1.\n\nCuntrullate 'o host, nomme utente e password e tentate n'ata vota.", "config-invalid-schema": "Schema MediaWiki \"$1\" nun è buono.\nAusate surtanto 'e lettere ASCII (a-z, A-Z), nummere (0-9) e carattere 'e sottolineatura (_).", - "config-db-sys-create-oracle": "'O prugramma 'e installazione supporta surtanto l'uso 'e nu cunto SYSDBA pe' putè crià nu cunto nuovo.", - "config-db-sys-user-exists-oracle": "'O cunto utente \"$1\" esiste già. SYSDBA se pò ausà surtanto pe' crià cunte nuove!", "config-postgres-old": "PostgreSQL $1 o cchiù muderno è necessario. Vuje tenite $2.", - "config-mssql-old": "Microsoft SQL Server $1 o cchiù muderno è necessario. Vuje tenite $2.", "config-sqlite-name-help": "Sciglite nu nomme ca identificasse 'o wiki vuosto.\nNun ausà spazie o trattine.\nChesto serverrà pe' putè miettere 'o nomme ro file 'e date SQLite.", "config-sqlite-parent-unwritable-group": "Nun se pò crià 'a cartella 'e date $1, pecché 'a cartella supiriore $2 nun se pò scrivere 'a 'o webserver.\n\n'O prugramma d'installazione ha determinato l'utente c' 'o quale 'o server web se stà a esecutà.\nDàte 'a pussibbelità 'e scrivere dint' 'a cartella $3 pe' cuntinuà\nNcopp'a nu sistema Unix/Linux:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Nun se può crià na cartella 'e date $1, pecché 'a cartella patre $2 nun è scrivibbele p' 'o server web.\n\n'O prugramma 'e installazione nun ave pututo determinà l'utente c' 'o quale se stà ausanno 'o server web.\nFacite 'a cartella $3 screvibbele globbalmente pe chisto (e ll'ati!) pe' putè cuntinuà:\nDint'a nu sistema Unix/Linux facite:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -159,11 +143,6 @@ "config-mysql-engine": "Mutore d'astipo:", "config-mysql-innodb": "InnoDB (fosse 'o cunzigliato)", "config-mysql-engine-help": "InnoDB è quase sempe 'a meglia opzione, pecché ave nu buono suppuorto concorrente.\n\nMyISAM putesse ghì cchiù ampressa int'a na installazione mono-utente e liegge-surtanto.\n'E database MyISAM se scassano cchiù spisso d' 'e database InnoDB.", - "config-mssql-auth": "Tipo d'autenticazione:", - "config-mssql-install-auth": "Sceglie 'o tipo d'autenticazziona ca s'ausarrà pe cunnettà â database, durante ll'operazziona d'istallazziona. Si piglie \"{{int:config-mssql-windowsauth}}\", 'e credenziale 'e qualunque fosse ll'utenza ca 'o webserver sta pruciessanno sarranno ausate.", - "config-mssql-web-auth": "Sceglie 'o tipo d'autenticazziona ca 'o web server pigliarrà pe se cunnettà a 'o server 'e bbase 'e dati, durante ll'operazziona nurmale d' 'a wiki.\nSi piglie \"{{int:config-mssql-windowsauth}}\", 'e credenziale 'e qualunque fosse ll'utenza ca 'o webserver sta pruciessanno sarranno ausate.", - "config-mssql-sqlauth": "Autenticazione 'e SQL Server", - "config-mssql-windowsauth": "Autenticazione 'e Windows", "config-site-name": "Nomme d' 'o wiki:", "config-site-name-help": "Chisto cumparerrà dint' 'a barra d' 'o titolo d' 'o navigatore e pure dint'a n'ati pizze.", "config-site-name-blank": "Scrive 'o nomme d' 'o sito.", diff --git a/includes/installer/i18n/nb.json b/includes/installer/i18n/nb.json index 522294f440..ba5af6c682 100644 --- a/includes/installer/i18n/nb.json +++ b/includes/installer/i18n/nb.json @@ -88,13 +88,9 @@ "config-db-type": "Databasetype:", "config-db-host": "Databasevert:", "config-db-host-help": "Hvis databasen kjører på en annen tjenermaskin, skriv inn vertsnavnet eller IP-adressen her.\n\nHvis du bruker et webhotell, vil du kunne be om aktuelt vertsnavn fra din leverandør.\n\nHvis du bruker MySQL, kan det hende at «localhost» ikke brukes som tjenernavn. Hvis så er tilfelle, prøv «127.0.0.1» som lokal IP-adresse.\n\nHvis du bruker PostgreSQL, la dette feltet være blankt slik at koplingen gjøres via en \"Unix socket\".", - "config-db-host-oracle": "Database TNS:", - "config-db-host-oracle-help": "Skriv inn et gyldig [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; en tnsnames.ora-fil må være synlig for installasjonsprosessen.
Hvis du bruker klientbibliotek 10g eller nyere kan du også bruke navngivingsmetoden [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifiser denne wikien", "config-db-name": "Databasenavn (ingen bindestreker):", "config-db-name-help": "Velg et navn som identifiserer wikien din.\nDet bør ikke inneholde mellomrom.\n\nHvis du bruker en delt nettvert vil verten din enten gi deg et spesifikt databasenavn å bruke, eller la deg opprette databaser via kontrollpanelet.", - "config-db-name-oracle": "Databaseskjema:", - "config-db-account-oracle-warn": "Det finnes tre mulig fremgangsmåter for å installere Oracle som database:\n\nHvis du ønsker å opprette en databasekonto som del av installasjonsprosessen, oppgi da en konto med SYSDBA-rolle som databasekonto for installasjonen og angi påkrevd autentiseringsinformasjon for web-aksesskontoen. Ellers kan du enten opprette web-aksesskontoen manuelt eller kun oppgi den kontoen (hvis den har påkrevede tillatelser for å opprette skjemeobjektene) , alternativt oppgi to ulike kontoer, en med opprettelsesprivilegier (create) og en begrenset konto for web-aksess.\n\nSkript for å opprette en konto med påkrevde privilegier finnes i \"maintenance/oracle/\"-folderen av denne installasjonen. Husk at det å bruke en begrenset konto vil blokkere all vedlikeholdsfunksjonalitet med standard konto.", "config-db-install-account": "Brukerkonto for installasjon", "config-db-username": "Databasebrukernavn:", "config-db-password": "Databasepassord:", @@ -113,37 +109,24 @@ "config-pg-test-error": "Får ikke kontakt med database '''$1''': $2", "config-sqlite-dir": "SQLite datamappe:", "config-sqlite-dir-help": "SQLite lagrer alle data i en enkelt fil.\n\nMappen du oppgir må være skrivbar for nettjeneren under installasjonen.\n\nDen bør '''ikke''' være tilgjengelig fra nettet, dette er grunnen til at vi ikke legger det der PHP-filene dine er.\n\nInstallasjonsprogrammet vil skrive en .htaccess-fil sammen med det, men om det mislykkes kan noen få tilgang til din råe database. Dette inkluderer rå brukerdata (e-postadresser, hashede passord) samt slettede revisjoner og andre begrensede data på wikien.\n\nVurder å plassere databasen et helt annet sted, for eksempel i /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Standard tabellrom:", - "config-oracle-temp-ts": "Midlertidig tabellrom:", "config-type-mysql": "MariaDB, MySQL eller kompatibel", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQLServer", "config-support-info": "MediaWiki støtter følgende databasesystem:\n\n$1\n\nHvis du ikke ser databasesystemet du prøver å bruke i listen nedenfor, følg instruksjonene det er lenket til over for å aktivere støtte.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] er den foretrukne databasetypen for MediaWiki og har best støtte. MediaWiki fungerer også med [{{int:version-db-mysql-url}} MySQL] og [{{int:version-db-percona-url}} Percona Server], som begge er MariaDB-kompatible. ([https://www.php.net/manual/en/mysqli.installation.php Hvordan kompilere PHP med MySQL-støtte])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] er et populært åpen kildekode-databasesystem og et alternativ til MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Hvordan kompilere PHP med PostgreSQL-støtte])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] er et lettvekts-databasesystem som har veldig god støtte. ([http://www.php.net/manual/en/pdo.installation.php Hvordan kompilere PHP med SQLite-støtte], bruker PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] er en kommersiell database for bedrifter. ([https://www.php.net/manual/en/oci8.installation.php Hvordan kompilere PHP med OCI8-støtte])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] er et kommersielt databasesystem under Windows for bedrifter. ([https://www.php.net/manual/en/sqlsrv.installation.php Hvordan kompilere PHP med SQLSRV-støtte])", "config-header-mysql": "MariadB/MySQL-innstillinger", "config-header-postgres": "PostgreSQL-innstillinger", "config-header-sqlite": "SQLite-innstillinger", - "config-header-oracle": "Oracle-innstillinger", - "config-header-mssql": "Microsoft SQLServer-innstillinger", "config-invalid-db-type": "Ugyldig databasetype", "config-missing-db-name": "Du må skrive inn en verdi for «{{int:config-db-name}}»", "config-missing-db-host": "Du må skrive inn en verdi for «{{int:config-db-host}}»", - "config-missing-db-server-oracle": "Du må skrive inn en verdi for «{{int:config-db-host-oracle}}»", - "config-invalid-db-server-oracle": "Ugyldig database-TNS «$1».\nBruk enten \"TNS Name\" eller en \"Easy Connect\"-streng ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods])", "config-invalid-db-name": "Ugyldig databasenavn «$1».\nBruk bare ASCII-bokstaver (a-z, A-Z), tall (0-9), undestreker (_) og bindestreker (-).", "config-invalid-db-prefix": "Ugyldig databaseprefiks «$1».\nBruk bare ASCII-bokstaver (a-z, A-Z), tall (0-9), undestreker (_) og bindestreker (-).", "config-connection-error": "$1.\n\nSjekk verten, brukernavnet og passordet nedenfor og prøv igjen. Hvis du brukte «localhost» som databasevert, prøv å bruke «127.0.0.1» i stedet (eller motsatt).", "config-invalid-schema": "Ugyldig skjema for MediaWiki «$1».\nBruk bare ASCII-bokstaver (a-z, A-Z), tall (0-9) og undestreker (_).", - "config-db-sys-create-oracle": "Installasjonsprogrammet støtter kun bruk av en SYSDBA-konto for opprettelse av en ny konto.", - "config-db-sys-user-exists-oracle": "Brukerkontoen «$1» finnes allerede. SYSDBA kan kun brukes for oppretting av nye kontoer!", "config-postgres-old": "PostgreSQL $1 eller senere kreves, du har $2.", - "config-mssql-old": "Microsoft SQLServer $1 eller senere kreves. Du har $2.", "config-sqlite-name-help": "Velg et navn som identifiserer wikien din.\nIkke bruk mellomrom eller bindestreker.\nDette vil bli brukt til SQLite-datafilnavnet.", "config-sqlite-parent-unwritable-group": "Kan ikke opprette datamappen $1 fordi foreldremappen $2 ikke er skrivbar for nettjeneren.\n\nInstallasjonsprogrammet har bestemt brukeren nettjeneren din kjører som.\nGjør $3-mappen skrivbar for denne for å fortsette.\nPå et Unix/Linux-system, gjør:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Kan ikke opprette datamappen $1 fordi foreldremappen $2 ikke er skrivbar for nettjeneren.\n\nInstallasjonsprogrammet kunne ikke bestemme brukeren nettjeneren din kjører som.\nGjør $3-mappen globalt skrivbar for denne (og andre!) for å fortsette.\nPå et Unix/Linux-system, gjør:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -168,11 +151,6 @@ "config-mysql-engine": "Lagringsmotor:", "config-mysql-innodb": "InnoDB (anbefalt)", "config-mysql-engine-help": "'''InnoDB''' er nesten alltid det beste alternativet siden den har god støtte for samtidighet («concurrency»).\n\n'''MyISAM''' kan være raskere i enbruker- eller les-bare-installasjoner.\nMyISAM-databaser har en tendens til å bli ødelagt oftere enn InnoDB-databaser.", - "config-mssql-auth": "Autentiseringstype:", - "config-mssql-install-auth": "Valg autentiseringstypen som skal brukes for å koble til databasen under installeringsprosessen. Hvis du velger «{{int:config-mssql-windowsauth}}», vil påloggingsinformasjonen for brukeren som kjører webtjeneren blir brukt.", - "config-mssql-web-auth": "Velg autentiseringstype som webtjeneren vil bruke for å koble til databasetjeneren under normal kjøring av wikien.\nHvis du velger «{{int:config-mssql-windowsauth}}», vil påloggingsinformasjonen til brukeren som kjører webtjeneren blir brukt.", - "config-mssql-sqlauth": "SQLServer-autentisering", - "config-mssql-windowsauth": "Windows-autentisering", "config-site-name": "Navn på wiki:", "config-site-name-help": "Dette vil vises i tittellinjen i nettleseren og diverse andre steder.", "config-site-name-blank": "Skriv inn et nettstedsnavn.", diff --git a/includes/installer/i18n/ne.json b/includes/installer/i18n/ne.json index 2677d47057..e20b9e9b2d 100644 --- a/includes/installer/i18n/ne.json +++ b/includes/installer/i18n/ne.json @@ -38,16 +38,13 @@ "config-env-hhvm": "HHVM $1 स्थापना गरिएको छ ।", "config-db-type": "डाटाबेस प्रकारः", "config-db-host": "डेटाबेस होस्ट:", - "config-db-host-oracle": "डेटाबेस TNS:", "config-db-name": "डाटाबेस नामः", - "config-db-name-oracle": "डेटाबेस स्केमा:", "config-db-username": "डाटाबेस प्रयोगकर्ता नामः", "config-db-password": "डाटाबेस पासबर्डः", "config-db-port": "डेटाबेस पोर्ट:", "config-header-mysql": "MySQL सेटिङ", "config-header-postgres": "PostgreSQL सेटिङहरू", "config-header-sqlite": "SQLite सेटिङ्हरू", - "config-header-oracle": "ओरेकल सेटिङहरू", "config-site-name": "विकीको नाम:", "config-site-name-blank": "साइटको नाम लेख्नुहोस।", "config-project-namespace": "आयोजना नेमस्पेस:", diff --git a/includes/installer/i18n/nl-informal.json b/includes/installer/i18n/nl-informal.json index 3450712796..c0c754be94 100644 --- a/includes/installer/i18n/nl-informal.json +++ b/includes/installer/i18n/nl-informal.json @@ -28,9 +28,7 @@ "config-no-cli-uploads-check": "''Waarschuwing:'' je standaardmap voor uploads ($1) wordt niet gecontroleerd op kwetsbaarheden voor het uitvoeren van willekeurige scripts gedurende de CLI-installatie.", "config-brokenlibxml": "Je systeem heeft een combinatie van PHP- en libxml2-versies geïnstalleerd die is foutgevoelig is en kan leiden tot onzichtbare beschadiging van gegevens in MediaWiki en andere webapplicaties.\nUpgrade naar PHP 5.2.9 of hoger en libxml2 2.7.3 of hoger([https://bugs.php.net/bug.php?id=45996 bij PHP gerapporteerde fout]).\nDe installatie wordt afgebroken.", "config-db-host-help": "Als je databaseserver een andere server is, voer dan de hostnaam of het IP-adres hier in.\n\nAls je gebruik maakt van gedeelde webhosting, hoort je provider je de juiste hostnaam te hebben verstrekt.\n\nAls je MediaWiki op een Windowsserver installeert en MySQL gebruikt, dan werkt \"localhost\" mogelijk niet als servernaam.\nAls het inderdaad niet werkt, probeer dan \"127.0.0.1\" te gebruiken als lokaal IP-adres.\n\nAls je PostgreSQL gebruikt, laat dit veld dan leeg om via een Unix-socket te verbinden.", - "config-db-host-oracle-help": "Voer een geldige [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name] in; een tnsnames.ora-bestand moet zichtbaar zijn voor deze installatie.
Als je gebruik maakt van clientlibraries 10g of een latere versie, kan je ook gebruik maken van de naamgevingsmethode [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-name-help": "Kies een naam die je wiki identificeert.\nEr mogen geen spaties gebruikt worden.\nAls je gebruik maakt van gedeelde webhosting, dan hoort je provider ofwel jou een te gebruiken databasenaam gegeven te hebben, of je aangegeven te hebben hoe je databases kunt aanmaken.", - "config-db-account-oracle-warn": "Er zijn drie ondersteunde scenario's voor het installeren van Oracle als databasebackend:\n\nAls je een database-account wilt aanmaken als onderdeel van het installatieproces, geef dan de gegevens op van een database-account in met de rol SYSDBA voor de installatie en voer de gewenste aanmeldgegevens in voor het account met webtoegang. Je kunt ook het account met webtoegang handmatig aanmaken en alleen van dat account de aanmeldgegevens opgeven als deze de vereiste rechten heeft om schemaobjecten aan te maken. Als laatste is het mogelijk om aanmeldgegevens van twee verschillende accounts op te geven; een met de rechten om schemaobjecten aan te maken, en een met alleen webtoegang.\n\nEen script voor het aanmaken van een account met de vereiste rechten is te vinden in de map \"maintenance/oracle/\" van deze installatie. Onthoud dat het gebruiken van een account met beperkte rechten alle mogelijkheden om beheerscripts uit te voeren met het standaardaccount onmogelijk maakt.", "config-db-prefix-help": "Als je een database moet gebruiken voor meerdere wiki's, of voor MediaWiki en een andere toepassing, dan kan je ervoor kiezen om een voorvoegsel toe te voegen aan de tabelnamen om conflicten te voorkomen.\nGebruik geen spaties.\n\nDit veld wordt meestal leeg gelaten.", "config-mysql-old": "Je moet MySQL $1 of later gebruiken.\nJij gebruikt $2.", "config-db-schema-help": "Dit schema klopt meestal.\nWijzig het alleen als je weet dat dit nodig is.", @@ -38,7 +36,6 @@ "config-support-info": "MediaWiki ondersteunt de volgende databasesystemen:\n\n$1\n\nAls je het databasesysteem dat je wilt gebruiken niet in de lijst terugvindt, volg dan de handleiding waarnaar hierboven wordt verwezen om ondersteuning toe te voegen.", "config-missing-db-name": "Je moet een waarde opgeven voor \"Databasenaam\"", "config-missing-db-host": "Je moet een waarde invoeren voor \"Databaseserver\"", - "config-missing-db-server-oracle": "Je moet een waarde opgeven voor \"Database-TNS\"", "config-postgres-old": "PostgreSQL $1 of hoger is vereist.\nJij gebruikt $2.", "config-sqlite-name-help": "Kies een naam die je wiki identificeert.\nGebruik geen spaties of koppeltekens.\nDeze naam wordt gebruikt voor het gegevensbestand van SQLite.", "config-upgrade-done": "Het bijwerken is afgerond.\n\nJe kunt [$1 je wiki nu gebruiken].\n\nAls je je LocalSettings.php opnieuw wilt aanmaken, klik dan op de knop hieronder.\nDit is '''niet aan te raden''' tenzij je problemen hebt met je wiki.", diff --git a/includes/installer/i18n/nl.json b/includes/installer/i18n/nl.json index 23835cd36e..0c687f640f 100644 --- a/includes/installer/i18n/nl.json +++ b/includes/installer/i18n/nl.json @@ -106,13 +106,9 @@ "config-db-type": "Databasetype:", "config-db-host": "Databasehost:", "config-db-host-help": "Als uw databaseserver een andere server is, voer dan de hostnaam of het IP-adres hier in.\n\nAls u gebruik maakt van gedeelde webhosting, hoort uw provider u de juiste hostnaam te hebben verstrekt.\n\nAls u MySQL gebruikt, dan werkt \"localhost\" mogelijk niet als servernaam.\nAls het inderdaad niet werkt, probeer dan \"127.0.0.1\" te gebruiken als lokaal IP-adres.\n\nAls u PostgreSQL gebruikt, laat dit veld dan leeg om via een Unix-socket te verbinden.", - "config-db-host-oracle": "Database-TNS:", - "config-db-host-oracle-help": "Voer een geldige [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name] in; een tnsnames.ora-bestand moet zichtbaar zijn voor deze installatie.
Als u gebruik maakt van clientlibraries 10g of een latere versie, kunt u ook gebruik maken van de naamgevingsmethode [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identificeer deze wiki", "config-db-name": "Databasenaam (zonder koppeltekens):", "config-db-name-help": "Kies een naam die uw wiki identificeert.\nEr mogen geen spaties gebruikt worden.\nAls u gebruik maakt van gedeelde webhosting, dan hoort uw provider ofwel u een te gebruiken databasenaam gegeven te hebben, of u aangegeven te hebben hoe u databases kunt aanmaken.", - "config-db-name-oracle": "Databaseschema:", - "config-db-account-oracle-warn": "Er zijn drie ondersteunde scenario's voor het installeren van Oracle als databasebackend:\n\nAls u een database-account wilt aanmaken als onderdeel van het installatieproces, geef dan de gegevens op van een database-account in met de rol SYSDBA voor de installatie en voer de gewenste aanmeldgegevens in voor het account met webtoegang. U kunt ook het account met webtoegang handmatig aanmaken en alleen van dat account de aanmeldgegevens opgeven als deze de vereiste rechten heeft om schemaobjecten aan te maken. Als laatste is het mogelijk om aanmeldgegevens van twee verschillende accounts op te geven; een met de rechten om schemaobjecten aan te maken, en een met alleen webtoegang.\n\nEen script voor het aanmaken van een account met de vereiste rechten is te vinden in de map \"maintenance/oracle/\" van deze installatie. Onthoud dat het gebruiken van een account met beperkte rechten alle mogelijkheden om beheerscripts uit te voeren met het standaardaccount onmogelijk maakt.", "config-db-install-account": "Gebruiker voor installatie", "config-db-username": "Gebruikersnaam voor database:", "config-db-password": "Wachtwoord voor database:", @@ -131,37 +127,24 @@ "config-pg-test-error": "Kan geen verbinding maken met database '''$1''': $2", "config-sqlite-dir": "Gegevensmap voor SQLite:", "config-sqlite-dir-help": "SQLite slaat alle gegevens op in een enkel bestand.\n\nDe map die u opgeeft moet beschrijfbaar zijn voor de webserver tijdens de installatie.\n\nDeze mag '''niet toegankelijk''' zijn via het web en het bestand mag dus niet tussen de PHP-bestanden staan.\n\nHet installatieprogramma schrijft het bestand .htaccess weg met het databasebestand, maar als dat niet werkt kan iemand zich toegang tot het ruwe databasebestand verschaffen.\nOok de gebruikersgegevens (e-mailadressen, wachtwoordhashes) en verwijderde versies en overige gegevens met beperkte toegang via MediaWiki zijn dan onbeschermd.\n\nOverweeg om de database op een totaal andere plaats neer te zetten, bijvoorbeeld in /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Standaard tablespace:", - "config-oracle-temp-ts": "Tijdelijke tablespace:", "config-type-mysql": "MariaDB, MySQL of compatibele systemen", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki ondersteunt de volgende databasesystemen:\n\n$1\n\nAls u het databasesysteem dat u wilt gebruiken niet in de lijst terugvindt, volg dan de handleiding waarnaar hierboven wordt verwezen om ondersteuning toe te voegen.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] is de primaire database voor MediaWiki en wordt het best ondersteund. MediaWiki werkt ook met [{{int:version-db-mysql-url}} MySQL] en [{{int:version-db-percona-url}} Percona Server], die MariaDB-compatibel zijn ([https://www.php.net/manual/en/mysqli.installation.php hoe PHP te compileren met MySQL-ondersteuning]).", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] is een populair open source databasesysteem als alternatief voor MySQL.([https://www.php.net/manual/en/pgsql.installation.php Hoe u PHP kunt compileren met ondersteuning voor PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] is een zeer goed ondersteund lichtgewicht databasesysteem ([https://www.php.net/manual/en/pdo.installation.php hoe PHP gecompileerd moet zijn met ondersteuning voor SQLite]; gebruikt PDO).", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] is een commerciële database voor grote bedrijven ([https://www.php.net/manual/en/oci8.installation.php PHP compileren met ondersteuning voor OCI8]).", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] is een commerciële enterprisedatabase voor Windows ([https://www.php.net/manual/en/sqlsrv.installation.php PHP compileren met ondersteuning voor SQLSRV]).", "config-header-mysql": "MariaDB/MySQL-instellingen", "config-header-postgres": "PostgreSQL-instellingen", "config-header-sqlite": "SQLite-instellingen", - "config-header-oracle": "Oracle-instellingen", - "config-header-mssql": "Instellingen voor Microsoft SQL Server", "config-invalid-db-type": "Ongeldig databasetype.", "config-missing-db-name": "U moet een waarde opgeven voor \"{{int:config-db-name}}\".", "config-missing-db-host": "U moet een waarde invoeren voor \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "U moet een waarde opgeven voor \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "Ongeldige database-TNS \"$1\".\nGebruik \"TNS Names\" of een \"Easy Connect\" tekst ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle naamgevingsmethoden])", "config-invalid-db-name": "Ongeldige databasenaam \"$1\".\nGebruik alleen letters (a-z, A-Z), cijfers (0-9) en liggende streepjes (_) en streepjes (-).", "config-invalid-db-prefix": "Ongeldig databasevoorvoegsel \"$1\".\nGebruik alleen letters (a-z, A-Z), cijfers (0-9) en liggende streepjes (_) en streepjes (-).", "config-connection-error": "$1.\n\nControleer de host, gebruikersnaam en wachtwoord en probeer het opnieuw. Probeer \"127.0.0.1\" in plaats van \"localhost\" als database host. (of omgekeerd)", "config-invalid-schema": "Ongeldig schema voor MediaWiki \"$1\".\nGebruik alleen letters (a-z, A-Z), cijfers (0-9) en liggende streepjes (_).", - "config-db-sys-create-oracle": "Het installatieprogramma biedt alleen de mogelijkheid een nieuw account aan te maken met een SYSDBA-account.", - "config-db-sys-user-exists-oracle": "Gebruikersaccount \"$1\" bestaat al. SYSDBA kan alleen gebruikt worden voor het aanmaken van een nieuw account!", "config-postgres-old": "PostgreSQL $1 of hoger is vereist.\nU gebruikt $2.", - "config-mssql-old": "Microsoft SQL Server $1 of hoger is vereist. U hebt $2.", "config-sqlite-name-help": "Kies een naam die uw wiki identificeert.\nGebruik geen spaties of koppeltekens.\nDeze naam wordt gebruikt voor het gegevensbestand van SQLite.", "config-sqlite-parent-unwritable-group": "Het was niet mogelijk de gegevensmap $1 te maken omdat in de bovenliggende map $2 niet geschreven mag worden door de webserver.\n\nHet installatieprogramma heeft vast kunnen stellen onder welke gebruiker de webserver draait.\nMaak de map $3 beschrijfbaar om door te kunnen gaan.\nVoer op een Linux-systeem de volgende opdrachten uit:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Het was niet mogelijk de gegevensmap $1 te maken omdat in de bovenliggende map $2 niet geschreven mag worden door de webserver.\n\nHet installatieprogramma heeft niet vast kunnen stellen onder welke gebruiker de webserver draait.\nMaak de map $3 beschrijfbaar voor de webserver (en anderen!) om door te kunnen gaan.\nVoer op een Linux-systeem de volgende opdrachten uit:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -186,11 +169,6 @@ "config-mysql-engine": "Opslagmethode:", "config-mysql-innodb": "InnoDB (aanbevolen)", "config-mysql-engine-help": "'''InnoDB''' is vrijwel altijd de beste instelling, omdat deze goed omgaat met meerdere verzoeken tegelijkertijd.\n\n'''MyISAM''' is bij een zeer beperkt aantal gebruikers mogelijk sneller, of als de wiki alleen-lezen is.\nMyISAM-databases raken vaker beschadigd dan InnoDB-databases.", - "config-mssql-auth": "Authenticatietype:", - "config-mssql-install-auth": "Selecteer de authenticatiemethode die wordt gebruikt om met de database te verbinden tijdens het installatieproces.\nAls u \"{{int:config-mssql-windowsauth}}\" selecteert, dan worden de aanmeldgegevens van de gebruiker waaronder de webserver draait voor authenticatie gebruikt.", - "config-mssql-web-auth": "Selecteer de authenticatiemethode die de webserver gebruikt om met de database te verbinden tijdens het installatieproces.\nAls u \"{{int:config-mssql-windowsauth}}\" selecteert, dan worden de aanmeldgegevens van de gebruiker waaronder de webserver draait voor authenticatie gebruikt.", - "config-mssql-sqlauth": "SQL Server Authenticatie", - "config-mssql-windowsauth": "Windowsauthenticatie", "config-site-name": "Naam van de wiki:", "config-site-name-help": "Deze naam verschijnt in de titelbalk van browsers en op andere plaatsen.", "config-site-name-blank": "Geef een naam op voor de site.", diff --git a/includes/installer/i18n/oc.json b/includes/installer/i18n/oc.json index 3aaecb53f7..814764a849 100644 --- a/includes/installer/i18n/oc.json +++ b/includes/installer/i18n/oc.json @@ -53,10 +53,8 @@ "config-using-uri": "Utilizacion de l'URL de servidor \"$1$2\".", "config-db-type": "Tipe de basa de donadas :", "config-db-host": "Nom d’òste de la basa de donadas :", - "config-db-host-oracle": "Nom TNS de la basa de donadas :", "config-db-wiki-settings": "Identificar aqueste wiki", "config-db-name": "Nom de la basa de donadas :", - "config-db-name-oracle": "Esquèma de basa de donadas :", "config-db-install-account": "Compte d'utilizaire per l'installacion", "config-db-username": "Nom d'utilizaire de la basa de donadas :", "config-db-password": "Senhal de la basa de donadas :", @@ -68,19 +66,13 @@ "config-db-schema": "Esquèma per MediaWiki", "config-pg-test-error": "Impossible de se connectar a la basa de donadas '''$1''' : $2", "config-sqlite-dir": "Dorsièr de las donadas SQLite :", - "config-oracle-def-ts": "Espaci d'emmagazinatge (''tablespace'') per defaut :", - "config-oracle-temp-ts": "Espaci d'emmagazinatge (''tablespace'') temporari :", "config-type-mysql": "MariaDB, MySQL o compatible", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "Paramètres de MySQL", "config-header-postgres": "Paramètres de PostgreSQL", "config-header-sqlite": "Paramètres de SQLite", - "config-header-oracle": "Paramètres d’Oracle", - "config-header-mssql": "Paramètres de Microsoft SQL Server", "config-invalid-db-type": "Tipe de basa de donadas invalid", "config-missing-db-name": "Vos cal entrar una valor per « {{int:config-db-name}} ».", "config-missing-db-host": "Vos cal entrar una valor per « {{int:config-db-host}} ».", - "config-missing-db-server-oracle": "Vos cal entrar una valor per « {{int:config-db-oracle}} ».", "config-postgres-old": "PostgreSQL $1 o version ulteriora es requesit, avètz $2.", "config-sqlite-readonly": "Lo fichièr $1 es pas accessible en escritura.", "config-sqlite-cant-create-db": "Impossible de crear lo fichièr de basa de donadas $1.", @@ -91,9 +83,6 @@ "config-db-web-create": "Creatz lo compte se existís pas ja", "config-mysql-engine": "Motor d'emmagazinatge :", "config-mysql-innodb": "InnoDB", - "config-mssql-auth": "Tipe d’autentificacion :", - "config-mssql-sqlauth": "Autentificacion de SQL Server", - "config-mssql-windowsauth": "Autentificacion Windows", "config-site-name": "Nom del wiki :", "config-site-name-blank": "Entratz un nom de site.", "config-project-namespace": "Espaci de noms del projècte :", diff --git a/includes/installer/i18n/olo.json b/includes/installer/i18n/olo.json index 6fdcd8204f..8926e6cbb4 100644 --- a/includes/installer/i18n/olo.json +++ b/includes/installer/i18n/olo.json @@ -28,12 +28,9 @@ "config-db-name": "Tiedokannan nimi:", "config-db-username": "Tiedokannan käyttäinimi:", "config-db-password": "Tiedokannan salasana:", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "MariaDB/MySQL-azetukset", "config-header-postgres": "PostgreSQL-azetukset", "config-header-sqlite": "SQLite-azetukset", - "config-header-oracle": "Oracle-azetukset", - "config-header-mssql": "Microsoft SQL Server azetukset", "config-mysql-innodb": "InnoDB", "config-site-name": "Wikin nimi:", "config-site-name-blank": "Kirjuta sivun nimi.", diff --git a/includes/installer/i18n/pl.json b/includes/installer/i18n/pl.json index feda6b2cf7..fc66bdbe32 100644 --- a/includes/installer/i18n/pl.json +++ b/includes/installer/i18n/pl.json @@ -107,13 +107,9 @@ "config-db-type": "Typ bazy danych:", "config-db-host": "Adres serwera bazy danych:", "config-db-host-help": "Jeśli serwer bazy danych jest na innej maszynie, wprowadź jej nazwę domenową lub adres IP.\n\nJeśli korzystasz ze współdzielonego hostingu, operator serwera powinien podać Ci prawidłową nazwę serwera w swojej dokumentacji.\n\nJeśli korzystasz z MySQL, użycie „localhost” może nie zadziałać jako nazwa hosta. Jeśli wystąpi ten problem, użyj „127.0.0.1” jako lokalnego adresu IP.\n\nJeżeli korzystasz z PostgreSQL, pozostaw to pole puste, aby połączyć się poprzez gniazdo Unixa.", - "config-db-host-oracle": "Nazwa instancji bazy danych (TNS):", - "config-db-host-oracle-help": "Wprowadź prawidłową [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm nazwę połączenia lokalnego]. Plik „tnsnames.ora” musi być widoczny dla instalatora.
Jeśli używasz biblioteki klienckiej 10g lub nowszej możesz również skorzystać z metody nazw [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm łatwego łączenia].", "config-db-wiki-settings": "Zidentyfikuj tę wiki", "config-db-name": "Nazwa bazy danych:", "config-db-name-help": "Wybierz nazwę, która zidentyfikuje Twoją wiki.\nNie może ona zawierać spacji.\n\nJeśli korzystasz ze współdzielonego hostingu, dostawca usługi hostingowej może wymagać użycia konkretnej nazwy bazy danych lub pozwalać na tworzenie baz danych za pośrednictwem panelu użytkownika.", - "config-db-name-oracle": "Nazwa schematu bazy danych:", - "config-db-account-oracle-warn": "Bazę danych Oracle można przygotować do pracy z MediaWiki na trzy sposoby:\n\nMożesz utworzyć konto użytkownika bazy danych podczas instalacji MediaWiki. Wówczas należy podać nazwę i hasło użytkownika z rolą SYSDBA w celu użycia go przez instalator do utworzenia nowe konta użytkownika, z którego korzystać będzie MediaWiki.\n\nMożesz również skorzystać z konta użytkownika bazy danych utworzonego bezpośrednio w Oracle i wówczas wystarczy podać tylko nazwę i hasło tego użytkownika. Konto z rolą SYSDBA nie będzie potrzebne, jednak konto użytkownika powinno mieć uprawnienia do utworzenia obiektów w schemacie bazy danych. Możesz też podać dwa konta - konto dla instalatora, z pomocą którego zostaną obiekty w schemacie bazy danych i drugie konto, z którego będzie MediaWiki korzystać będzie do pracy.\n\nW podkatalogu \"maintenance/oracle\" znajduje się skrypt do tworzenia konta użytkownika. Korzystanie z konta użytkownika z ograniczonymi uprawnieniami spowoduje wyłączenie funkcji związanych z aktualizacją oprogramowania MediaWiki.", "config-db-install-account": "Konto użytkownika dla instalatora", "config-db-username": "Nazwa użytkownika bazy danych:", "config-db-password": "Hasło bazy danych:", @@ -132,34 +128,22 @@ "config-pg-test-error": "Nie można połączyć się z bazą danych''' $1 ''': $2", "config-sqlite-dir": "Katalog danych SQLite:", "config-sqlite-dir-help": "SQLite przechowuje wszystkie dane w pojedynczym pliku.\n\nWskazany katalog musi być dostępny do zapisu przez webserver podczas instalacji.\n\nPowinien '''nie''' być dostępny za z sieci web, dlatego nie umieszczamy ich tam, gdzie znajdują się pliki PHP.\n\nInstalator zapisze plik .htaccess obokniego, ale jeśli to zawiedzie, ktoś może uzyskać dostęp do nieprzetworzonej bazy danych.\nZawiera ona nieopracowane dane użytkownika (adresy e-mail, zahaszowane hasła) jak również usunięte wersje oraz inne dane o ograniczonym dostępie na wiki.\n\nWarto rozważyć umieszczenie w bazie danych zupełnie gdzie indziej, na przykład w /var/lib/mediawiki/yourwiki .", - "config-oracle-def-ts": "Domyślna przestrzeń tabel:", - "config-oracle-temp-ts": "Przestrzeń tabel tymczasowych:", "config-type-mysql": "MariaDB, MySQL lub kompatybilna", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki może współpracować z następującymi systemami baz danych:\n\n$1\n\nPoniżej wyświetlone są systemy baz danych gotowe do użycia. Jeżeli poniżej brakuje bazy danych, z której chcesz skorzystać, oznacza to, że brakuje odpowiedniego oprogramowania lub zostało ono niepoprawnie skonfigurowane. Powyżej znajdziesz odnośniki do dokumentacji, która pomoże w konfiguracji odpowiednich komponentów.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] jest bazą danych, na której rozwijane jest oprogramowanie MediaWiki. MediaWiki działa również z [{{int:version-db-mysql-url}} MySQL] i [{{int:version-db-percona-url}} Percona Server], które są zgodne z MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Zobacz, jak skompilować PHP ze wsparciem dla MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] jest popularnym, otawrtym systemem baz danych, często stosowanym jako alternatywa dla MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Zobacz, jak skompilować PHP z obsługą PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] jest niewielkim systemem bazy danych, z którym MediaWiki bardzo dobrze współpracuje. ([https://www.php.net/manual/pl/pdo.installation.php Zobacz, jak skompilować PHP ze wsparciem dla SQLite], korzystając z PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] jest komercyjną profesjonalną bazą danych. ([https://www.php.net/manual/pl/oci8.installation.php Jak skompilować PHP ze wsparciem dla OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] jest komercyjną profesjonalną bazą danych. ([https://www.php.net/manual/pl/sqlsrv.installation.php Jak skompilować PHP ze wsparciem dla SQLSRV])", "config-header-mysql": "Ustawienia MariaDB/MySQL", "config-header-postgres": "Ustawienia PostgreSQL", "config-header-sqlite": "Ustawienia SQLite", - "config-header-oracle": "Ustawienia Oracle", - "config-header-mssql": "Ustawienia Microsoft SQL Server", "config-invalid-db-type": "Nieprawidłowy typ bazy danych", "config-missing-db-name": "Należy wpisać wartość w polu „{{int:config-db-name}}”.", "config-missing-db-host": "Należy wpisać wartość w polu „{{int:config-db-host}}”.", - "config-missing-db-server-oracle": "Należy wpisać wartość w polu „{{int:config-db-host-oracle}}”.", - "config-invalid-db-server-oracle": "Nieprawidłowa nazwa instancji bazy danych (TNS) „$1”.\nUżyj \"TNS Name\" lub \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods])", "config-invalid-db-name": "Nieprawidłowa nazwa bazy danych „$1”.\nUżywaj wyłącznie liter ASCII (a-z, A-Z), cyfr (0-9), podkreślenia (_) lub znaku odejmowania (-).", "config-invalid-db-prefix": "Nieprawidłowy prefiks bazy danych „$1”.\nUżywaj wyłącznie liter ASCII (a-z, A-Z), cyfr (0-9), podkreślenia (_) lub znaku odejmowania (-).", "config-connection-error": "$1.\n\nSprawdź adres serwera, nazwę użytkownika i hasło, a następnie spróbuj ponownie. Jeżeli korzystasz z „localhosta” jako serwera bazy danych, spróbuj zamiast tego użyć „127.0.0.1” (lub na odwrót).", "config-invalid-schema": "Nieprawidłowa nazwa schematu dla MediaWiki „$1”.\nNazwa może zawierać wyłącznie liter ASCII (a-z, A-Z), cyfr (0-9) i podkreślenia (_).", - "config-db-sys-create-oracle": "Instalator może wykorzystać wyłącznie konto SYSDBA do tworzenia nowych kont użytkowników.", - "config-db-sys-user-exists-oracle": "Konto użytkownika „$1” już istnieje. SYSDBA można użyć tylko do utworzenia nowego konta!", "config-postgres-old": "Korzystasz z wersji $2 oprogramowania PostgreSQL, a potrzebna jest wersja co najmniej $1.", - "config-mssql-old": "Wymagany jest Microsoft SQL Server w wersji $1 lub nowszej. Masz zainstalowaną wersję $2.", "config-sqlite-name-help": "Wybierz nazwę, która będzie identyfikować Twoją wiki.\nNie wolno używać spacji ani myślników.\nZostanie ona użyta jako nazwa pliku danych SQLite.", "config-sqlite-parent-unwritable-group": "Nie można utworzyć katalogu danych $1 , ponieważ katalog nadrzędny $2 nie jest dostępny do zapisu przez webserwer.\n\nInstalator nie może określić, jako kttóry użytkownik działa webserwer.\nZezwól by katalog $3 był dostępny do zapisu przez niego, aby przejść dalej.\nW systemie Unix/Linux wykonaj:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Nie można utworzyć katalogu danych $1 , ponieważ katalog nadrzędny $2 nie jest dostępny do zapisu przez webserwer.\n\nInstalator nie może określić, jako kttóry użytkownik działa webserwer.\nZezwól by katalog $3 był globalnie modyfikowalny przez niego (i innych!) aby przejść dalej.\nW systemie Unix/Linux wykonaj:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -184,11 +168,6 @@ "config-mysql-engine": "Silnik przechowywania", "config-mysql-innodb": "InnoDB (zalecane)", "config-mysql-engine-help": "'''InnoDB''' jest prawie zawsze najlepszą opcją, ponieważ posiada dobrą obsługę współbieżności.\n\n'''MyISAM''' może być szybsze w instalacjach pojedynczego użytkownika lub tylko do odczytu.\nBazy danych MyISAM mają tendencję do ulegania uszkodzeniom częściej niż bazy InnoDB.", - "config-mssql-auth": "Typ uwierzytelniania:", - "config-mssql-install-auth": "Wybierz typ uwierzytelniania, który będzie używany do łączenia się z bazą danych w trakcie procesu instalacji.\nJeśli wybierzesz „{{int:config-mssql-windowsauth}}”, będą wykorzystywane dane konta użytkownika, pod którym działa serwer www.", - "config-mssql-web-auth": "Wybierz typ uwierzytelniania, który będzie używany przez serwer www do łączenia się z bazą danych podczas normalnego funkcjonowania wiki.\nJeśli wybierzesz „{{int:config-mssql-windowsauth}}”, użyte zostaną dane konta użytkownika, pod którym działa serwer www.", - "config-mssql-sqlauth": "Uwierzytelnianie serwera SQL", - "config-mssql-windowsauth": "Autoryzacja Windows", "config-site-name": "Nazwa wiki:", "config-site-name-help": "Ten napis pojawi się w pasku tytułowym przeglądarki oraz w różnych innych miejscach.", "config-site-name-blank": "Wprowadź nazwę witryny.", @@ -284,7 +263,7 @@ "config-skins-must-enable-some": "Musisz wybrać co najmniej jedną skórkę, aby ją włączyć.", "config-skins-must-enable-default": "Skórka wybrana jako domyślna musi być włączona.", "config-install-alreadydone": "'''Uwaga''' – wydaje się, że MediaWiki jest już zainstalowane, a obecnie próbujesz zainstalować je ponownie.\nPrzejdź do następnej strony.", - "config-install-begin": "Po naciśnięciu \"{{int:config-continue}}\", rozpocznie się instalacja MediaWiki.\nJeśli nadal chcesz dokonać zmian, naciśnij \"{{int:config-back}}\".", + "config-install-begin": "Po naciśnięciu „{{int:config-continue}}”, rozpocznie się instalacja MediaWiki.\nJeśli nadal chcesz dokonać zmian, naciśnij „{{int:config-back}}”.", "config-install-step-done": "gotowe", "config-install-step-failed": "nieudane", "config-install-extensions": "Dołączanie rozszerzeń", diff --git a/includes/installer/i18n/pms.json b/includes/installer/i18n/pms.json index b6ab572056..b8b97de396 100644 --- a/includes/installer/i18n/pms.json +++ b/includes/installer/i18n/pms.json @@ -81,13 +81,9 @@ "config-db-type": "Sòrt ëd base ëd dàit:", "config-db-host": "Ospitant ëd la base ëd dàit:", "config-db-host-help": "Se sò servent ëd base ëd dàit a l'é su un servent diferent, ch'a anserissa ambelessì ël nòm dl'ospitant o l'adrëssa IP.\n\nS'a deuvra n'ospitalità partagià, sò fornidor d'ospitalità a dovrìa deje ël nòm dl'ospitant giust ant soa documentassion.\n\nSe a anstala su un servent Windows e a deuvra MySQL, dovré «localhost» a podrìa funsioné nen com nòm dël servent. S'a marcia nen, ch'a preuva «127.0.0.1» com adrëssa IP local.\n\nS'a deuvra PostgresSQL, ch'a lassa sto camp bianch për coleghesse a travers un socket UNIX.", - "config-db-host-oracle": "TNS dla base ëd dàit:", - "config-db-host-oracle-help": "Anserì un [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm nòm ëd conession local] bon; n'archivi tnsnames.ora a dev esse visìbil da costa anstalassion..
S'a deuvra le librarìe cliente 10g o pi neuve a peul ëdcò dovré ël métod ëd nominassion [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identìfica sta wiki", "config-db-name": "Nòm dla base ëd dàit:", "config-db-name-help": "Ch'a serna un nòm ch'a identìfica soa wiki.\nA dovrìa conten-e gnun ëspassi.\n\nS'a deuvra n'ospitalità partagià, sò fornidor ëd l'ospitalità a-j darà un nòm ëd base ëd dàit specìfich da dovré o a lassrà ch'a lo crea via un panel ëd contròl.", - "config-db-name-oracle": "Schema dla base ëd dàit:", - "config-db-account-oracle-warn": "A-i é tre possibilità mantnùe për istalé Oracle tanme terminal ëd base ëd dàit:\n\nS'a veul creé un cont ëd base ëd dàit com part dël process d'istalassion, për piasì ch'a fornissa un cont con ël ròl SYSDBA com cont ëd base ëd dàit për l'istalassion e ch'a specìfica le credensiaj vorsùe për ël cont d'acess an sl'aragnà, dësnò a peul ëdcò creé ël cont d'acess an sl'aragnà manualment e mach fornì col cont (se a l'ha ij përmess necessari për creé j'oget dë schema) o fornì doi cont diferent, un con ij privilegi ëd creé e un limità për l'acess an sla Ragnà.\n\nIj senari për creé un cont con ij privilegi necessari a peul esse trovà ant la cartela «manutension/oracol/» ëd costa istalassion. Ch'a ten-a da ment che dovrand un cont limità a disabiliterà tute le funsion ëd manutension con ël cont predefinì.", "config-db-install-account": "Cont d'utent për l'instalassion.", "config-db-username": "Nòm d'utent dla base ëd dàit:", "config-db-password": "Ciav dla base ëd dàit:", @@ -106,28 +102,20 @@ "config-pg-test-error": "Impossìbil coleghesse a la base ëd dàit '''$1'''; $2", "config-sqlite-dir": "Dossié dij dat SQLite:", "config-sqlite-dir-help": "SQLite a memorisa tùit ij dat ant n'archivi ùnich.\n\nËl dossié che chiel a forniss a dev esse scrivìbil dal servent durant l'instalassion.\n\nA dovrìa '''pa''' esse acessìbil da l'aragnà, sossì a l'é për sòn ch'i l'oma pa butalo andova a-i son ij sò file PHP.\n\nL'instalador a scriverà n'archivi .htaccess ansema con chiel, ma se lòn a faliss quaidun a peul intré an soa base ëd dàit originaria.\nLòn a comprend ij dat brut ëd l'utent (adrëssa ëd pòsta eletrònica, ciav tërbola) e ëdcò le revision scancelà e d'àutri dat segret ëd la wiki.\n\nCh'a consìdera ëd buté la base ëd dàit tuta antrega da n'àutra part, për esempi an /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Spassi dla tàula dë stàndard:", - "config-oracle-temp-ts": "Spassi dla tàula temporani:", "config-support-info": "MediaWiki a manten ij sistema ëd base ëd dàit sì-dapress:\n\n$1\n\nS'a vëd pa listà sì-sota ël sistema ëd base ëd dàit ch'a preuva a dovré, antlora va andaré a j'istrussion dl'anliura sì-dzora për abilité ël manteniment.", "config-dbsupport-mysql": "* $1 e l'é l'obietiv primari për MediaWiki e a l'é mej mantnù ([https://www.php.net/manual/en/mysql.installation.php com compilé PHP con ël manteniment MySQL])", "config-dbsupport-postgres": "* $1 e l'é un sistema ëd base ëd dàit popolar a sorgiss duverta com alternativa a MySQL ([https://www.php.net/manual/en/pgsql.installation.php com compilé PHP con ël manteniment ëd PostgreSQL]). A peulo ess-ie chèich cit bigat, e a l'é nen arcomandà ëd dovrelo an n'ambient ëd produssion.", "config-dbsupport-sqlite": "* $1 e l'é un sistema ëd base ëd dàit leger che a l'é motobin bin mantnù ([http://www.php.net/manual/en/pdo.installation.php com compilé PHP con ël manteniment ëd SQLite], a deuvra PDO)", - "config-dbsupport-oracle": "* $1 a l'é na base ëd dàit comersial për j'amprèise. ([http://www.php.net/manual/en/oci8.installation.php Com compilé PHP con ël manteniment OCI8])", "config-header-mysql": "Ampostassion MySQL", "config-header-postgres": "Ampostassion PostgreSQL", "config-header-sqlite": "Ampostassion SQLite", - "config-header-oracle": "Ampostassion Oracle", "config-invalid-db-type": "Sòrt ëd ëd base ëd dàit pa bon-a", "config-missing-db-name": "A dev buteje un valor për \"Nòm ëd la base ëd dàit\"", "config-missing-db-host": "A dev buteje un valor për \"l'òspit ëd la base ëd dàit\"", - "config-missing-db-server-oracle": "A dev buteje un valor për \"TNS ëd la base ëd dat\"", - "config-invalid-db-server-oracle": "TNS ëd la base ëd dat pa bon \"$1\".\nDovré mach dle litre ASCII (a-z, A-Z), nùmer (0-9), sotlignadure (_) e pontin (.).", "config-invalid-db-name": "Nòm ëd la base ëd dàit pa bon \"$1\".\nDovré mach litre ASCII (a-z, A-Z), nùmer (0-9), sotlignadure (_) e tratin (-).", "config-invalid-db-prefix": "Prefiss dla base ëd dàit pa bon \"$1\".\nDovré mach litre ASCII (a-z, A-Z), nùmer (0-9), sotlignadure (_) e tratin (-).", "config-connection-error": "$1.\n\nControla l'ospitant, lë stranòm d'utent e la ciav sì-sota e prové torna.", "config-invalid-schema": "Schema pa bon për MediaWiki \"$1\".\nDovré mach litre ASCII (a-z, A-Z), nùmer (0-9) e sotlignadure (_).", - "config-db-sys-create-oracle": "L'istalador a arconòss mach ij cont SYSDBA durant la creassion d'un cont neuv.", - "config-db-sys-user-exists-oracle": "Ël cont utent \"$1\" a esist già. SYSDBA a peul mach esse dovrà për creé un cont neuv!", "config-postgres-old": "A-i é da manca ëd PostgreSQL $1 o pi recent, chiel a l'ha $2.", "config-sqlite-name-help": "Serne un nòm ch'a identìfica soa wiki.\nDovré nì dë spassi nì ëd tratin.\nSòn a sarà dovrà për ël nòm ëd l'archivi ëd dat SQLite.", "config-sqlite-parent-unwritable-group": "As peul pa creesse ël dossié ëd dat $1, përchè ël dossié a mont $2 a l'é pa scrivìbil dal servent.\n\nL'instalador a l'ha determinà sota che utent a gira sò servent.\nFé an manera che ël dossié $3 a sia scrivìbil da chiel për continué.\nSu un sistema Unix/Linux buté:\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", diff --git a/includes/installer/i18n/ps.json b/includes/installer/i18n/ps.json index 632813ca56..4517ca1908 100644 --- a/includes/installer/i18n/ps.json +++ b/includes/installer/i18n/ps.json @@ -37,20 +37,15 @@ "config-using-uri": "د پالنگر URL \"$1$2\" کارېږي.", "config-db-type": "د توکبنسټ ډول:", "config-db-host": "د توکبنسټ کوربه:", - "config-db-host-oracle": "د توکبنسټ TNS:", "config-db-wiki-settings": "دا ويکي پېژندل", "config-db-name": "د توکبنسټ نوم:", - "config-db-name-oracle": "د اومتوکبنسټ طرحه:", "config-db-username": "د توکبنسټ کارن-نوم:", "config-db-password": "د توکبنسټ پټنوم:", "config-db-port": "د توکبنسټ ور:", "config-db-schema": "د مېډياويکي طرحه:", - "config-type-mssql": "مايکروسافټ SQL پالنگر", "config-header-mysql": "د MySQL امستنې", "config-header-postgres": "د PostgreSQL امستنې", "config-header-sqlite": "د SQLite امستنې", - "config-header-oracle": "د اورېکل امستنې", - "config-header-mssql": "د مايکروسافټ SQL پالنگر امستنې", "config-sqlite-readonly": "د $1 دوتنه د ليکلو وړ نه ده.", "config-sqlite-cant-create-db": "د توکبنسټ دوتنه $1 جوړه نه شوه.", "config-site-name": "د ويکي نوم:", diff --git a/includes/installer/i18n/pt-br.json b/includes/installer/i18n/pt-br.json index 5d1cc8fd02..a267cb85ac 100644 --- a/includes/installer/i18n/pt-br.json +++ b/includes/installer/i18n/pt-br.json @@ -106,13 +106,9 @@ "config-db-type": "Tipo do banco de dados:", "config-db-host": "Servidor do banco de dados:", "config-db-host-help": "Se o banco de dados do seu servidor está em um servidor diferente, digite o nome do host ou o endereço IP aqui.\n\nSe você está utilizando uma hospedagem web compartilhada, o seu provedor de hospedagem deverá fornecer o nome do host correto na sua documentação.\n\nSe você está usando o MySQL, usar \"localhost\" pode não funcionar para o nome de servidor. Se não funcionar, tente \"127.0.0.1\" para o endereço de IP local.\n\nSe você está usando PostgreSQl, deixe este campo em branco para se conectar através de um socket Unix.", - "config-db-host-oracle": "TNS do banco de dados:", - "config-db-host-oracle-help": "Digite um [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Nome de Conexão local] válido; o arquivo tnsnames.ora precisa estar visível para esta instalação.
Se você estiver usando bibliotecas cliente 10g ou mais recente, você também pode usar o método [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifique esta wiki", "config-db-name": "Nome da base de dados (sem hífen):", "config-db-name-help": "Escolha um nome que identifique a sua wiki.\nEle não deve conter espaços.\n\nSe você está utilizando uma hospedagem web compartilhada, o provedor de hospedagem lhe dará um nome especifico de banco de dados para usar ou o deixará criar a partir do painel de controle.", - "config-db-name-oracle": "Esquema do banco de dados:", - "config-db-account-oracle-warn": "Há três cenários suportados para instalar o Oracle como backend do banco de dados:\n\nSe você deseja criar a conta do banco de dados como parte do processo de instalação, forneça uma conta com função SYSDBA como conta do banco de dados para instalação e especifique as credenciais desejadas para a conta de acesso pela web, caso contrário, você poderá criar a conta de acesso via web manualmente e fornecer apenas aquela conta (se tiver permissões necessárias para criar os objetos schema) ou fornecer duas contas diferentes, uma com privilégios de criação e uma restrita para acesso à web.\n\nO script para criar uma conta com os privilégios necessários pode ser encontrado no diretório \"maintenance/oracle/\" desta instalação. Lembre-se de que usar uma conta restrita desativará todos os recursos de manutenção com a conta padrão.", "config-db-install-account": "Conta de usuário para instalação", "config-db-username": "Nome de usuário do banco de dados:", "config-db-password": "Senha do banco de dados:", @@ -131,37 +127,24 @@ "config-pg-test-error": "Não foi possível se conectar com o banco de dados $1: $2", "config-sqlite-dir": "Diretório de dados do SQLite:", "config-sqlite-dir-help": "O SQLite armazena todos os dados em um único arquivo.\n\nO diretório que você fornecer deve permitir a sua escrita pelo servidor web durante a instalação.\n\nO diretório não deve ser acessível pela web, por isso não estamos colocando onde estão os seus arquivos PHP.\n\nO instalador escreverá um arquivo .htaccess, mas se isso falhar alguém poderá ganhar acesso a toda sua base de dados.\nIsso inclui dados brutos dos usuários (endereços de e-mail, senhas criptografadas) assim como todas revisões deletadas e outros dados restritos na wiki.\n\nConsidere colocar a banco de dados em algum outro lugar, por exemplo /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Espaço de tabela padrão:", - "config-oracle-temp-ts": "Tablespace temporário:", "config-type-mysql": "MariaDB, MySQL (ou compatível)", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "O MediaWiki suporta os sistemas de banco de dados a seguir:\n\n$1\n\nSe você não vê o sistema de banco de dados que você está tentando usar listados abaixo, siga as instruções relacionadas acima, para ativar o suporte.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] é a base de dados preferida para o MediaWiki e a melhor suportada. O MediaWiki também trabalha com [{{int:version-db-mysql-url}} MySQL] e [{{int:version-db-percona-url}} Percona Server], que são compatíveis com MariaDB. ([https://www.php.net/manual/pt_BR/mysqli.installation.php Como compilar PHP com suporte para MySQL].)", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] é um popular sistema de banco de dados de código aberto como uma alternativa para o MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Como compilar o PHP com suporte PostgreSQL])", "config-dbsupport-sqlite": "* O [{{int:version-db-sqlite-url}} SQLite] é uma plataforma de base de dados ligeira muito bem suportada. ([https://www.php.net/manual/en/pdo.installation.php Como compilar PHP com suporte para SQLite], usa PDO.)", - "config-dbsupport-oracle": "* A [{{int:version-db-oracle-url}} Oracle] é uma base de dados comercial para empresas. ([https://www.php.net/manual/pt_BR/oci8.installation.php Como compilar PHP com suporte para OCI8].)", - "config-dbsupport-mssql": "* O [{{int:version-db-mssql-url}} Microsoft SQL Server] é uma base de dados comercial do Windows para empresas. ([https://www.php.net/manual/en/sqlsrv.installation.php Como compilar PHP com suporte para SQLSRV].)", "config-header-mysql": "Definições MariaDB/MySQL", "config-header-postgres": "Configurações PostgreSQL", "config-header-sqlite": "Configurações SQLite", - "config-header-oracle": "Configurações Oracle", - "config-header-mssql": "Configurações Microsoft SQL Server", "config-invalid-db-type": "Tipo do banco de dados inválido.", "config-missing-db-name": "Você deve inserir um valor para \"{{int:config-db-name}}\".", "config-missing-db-host": "Você deve inserir um valor para \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Você deve inserir um valor para \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "Banco de dados TNS inválido \"$1\".\nUse \"TNS Name\" ou \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Métodos de nomeação da Oracle]).", "config-invalid-db-name": "O nome do banco de dados é inválido \"$1\".\nUse apenas letras ASCII (a-z, A-Z), números (0-9), underscores (_) e hifens (-).", "config-invalid-db-prefix": "O prefixo do banco de dados é inválido \"$1\".\nUse apenas letras ASCII (a-z, A-Z), números (0-9), underscores (_) e hifens (-).", "config-connection-error": "$1.\n\nVerifique o servidor, nome de usuário e senha e tente novamente. Se estiver usando \"localhost\" como o servidor do banco de dados, tente usar \"127.0.0.1\" em vez disso (ou vice versa).", "config-invalid-schema": "Schema inválido para o MediaWiki \"$1\".\nUse apenas letras ASCII (a-z, A-Z), números (0-9) e underscores (_).", - "config-db-sys-create-oracle": "O instalador só permite criar uma conta nova usando uma conta SYSDBA.", - "config-db-sys-user-exists-oracle": "A conta de usuário \"$1\" já existe. SYSDBA somente pode ser utilizado na criação de uma nova conta!", "config-postgres-old": "PostgreSQL $1 ou posterior é necessário. Você tem $2.", - "config-mssql-old": "Microsoft SQL Server $1 ou posterior é necessário. Você tem $2.", "config-sqlite-name-help": "Escolha um nome que identifique a sua wiki.\nNão utilize espaços ou hifens.\nIsto será utilizado como nome do arquivo de dados do SQLite.", "config-sqlite-parent-unwritable-group": "Não é possível criar o diretório de dados $1, porque o diretório pai $2 não pode ser gravado pelo servidor web.\n\nO instalador conseguiu determinar o usuário em que seu servidor web está sendo executado.\nDe permissão de gravação global ao diretório $3 para o instalador para continuar.\nEm um sistema Unix/Linux faça:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Não é possível criar o diretório de dados $1, porque o diretório pai $2 não pode ser gravado pelo servidor web.\n\nO instalador não conseguiu determinar o usuário em que seu servidor web está sendo executado.\nDe permissão de gravação global ao diretório $3 para o instalador (e outros!) para continuar.\nEm um sistema Unix/Linux faça:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -186,11 +169,6 @@ "config-mysql-engine": "Mecanismo de armazenamento:", "config-mysql-innodb": "InnoDB (recomendado)", "config-mysql-engine-help": "InnoDB é quase sempre a melhor opção, uma vez que possui um bom suporte de concorrência.\n\nMyISAM pode ser mais rápido em instalações de usuário único ou somente leitura.\\O banco de dados MyISAM tendem a ficar corrompidos mais frequentemente do que os bancos de dados InnoDB.", - "config-mssql-auth": "Tipo de autenticação:", - "config-mssql-install-auth": "Selecione o tipo de autenticação que será usado para se conectar ao banco de dados durante o processo de instalação.\nSe você selecionar \"{{int:config-mssql-windowsauth}}\", as credenciais de qualquer usuário que o servidor web esteja executando serão usadas.", - "config-mssql-web-auth": "Selecione o tipo de autenticação que o servidor web usará para se conectar ao servidor do banco de dados, durante a operação normal da wiki.\nSe você selecionar \"{{int:config-mssql-windowsauth}}\", as credenciais de qualquer usuário no qual o servidor web está rodando serão usadas.", - "config-mssql-sqlauth": "Autenticação do SQL Server", - "config-mssql-windowsauth": "Autenticação do Windows", "config-site-name": "Nome da wiki:", "config-site-name-help": "Isto aparecerá na barra de títulos do navegador e em vários outros lugares.", "config-site-name-blank": "Digite o nome do site.", diff --git a/includes/installer/i18n/pt.json b/includes/installer/i18n/pt.json index 223e26ede2..f08ea751b8 100644 --- a/includes/installer/i18n/pt.json +++ b/includes/installer/i18n/pt.json @@ -105,13 +105,9 @@ "config-db-type": "Tipo da base de dados:", "config-db-host": "Servidor da base de dados:", "config-db-host-help": "Se a base de dados estiver num servidor separado, introduza aqui o nome ou o endereço IP desse servidor.\n\nSe estiver a usar um servidor partilhado, o fornecedor do alojamento deve fornecer o nome do servidor na documentação.\n\nSe estiver a usar MySQL, usar como nome do servidor \"localhost\" poderá não funcionar. Se não funcionar, tente usar \"127.0.0.1\" como endereço IP local.\n\nSe estiver a usar PostgreSQL, deixe este campo em branco para fazer a ligação através de um socket Unix.", - "config-db-host-oracle": "TNS (Transparent Network Substrate) da base de dados:", - "config-db-host-oracle-help": "Introduza um [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Nome Local de Ligação] válido; tem de estar visível para esta instalação um ficheiro tnsnames.ora.
Se está a usar bibliotecas cliente versão 10g ou posterior, também pode usar o método [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Ligação Fácil] de atribuição do nome.", "config-db-wiki-settings": "Identifique esta wiki", "config-db-name": "Nome da base de dados (sem hífenes):", "config-db-name-help": "Escolha um nome para identificar a sua wiki.\nO nome não deve conter espaços.\n\nSe estiver a usar um servidor partilhado, o fornecedor do alojamento deve poder fornecer-lhe o nome de uma base de dados que possa usar, ou permite-lhe criar bases de dados através de um painel de controlo.", - "config-db-name-oracle": "Esquema ''(schema)'' da base de dados:", - "config-db-account-oracle-warn": "Há três cenários suportados na instalação do servidor de base de dados Oracle:\n\nSe pretende criar a conta de acesso pela internet na base de dados durante o processo de instalação, forneça como conta para a instalação uma conta com o papel de SYSDBA na base de dados e especifique as credenciais desejadas para a conta de acesso pela internet. Se não pretende criar a conta de acesso pela internet durante a instalação, pode criá-la manualmente e fornecer só essa conta para a instalação (se ela tiver as permissões necessárias para criar os objetos do esquema ''(schema)''). A terceira alternativa é fornecer duas contas diferentes; uma com privilégios de criação e outra com privilégios limitados para o acesso pela internet.\n\nExiste um script para criação de uma conta com os privilégios necessários no diretório \"maintenance/oracle/\" desta instalação. Mantenha em mente que usar uma conta com privilégios limitados impossibilita todas as operações de manutenção com a conta padrão.", "config-db-install-account": "Conta do utilizador para a instalação", "config-db-username": "Nome do utilizador da base de dados:", "config-db-password": "Palavra-passe do utilizador da base de dados:", @@ -130,37 +126,24 @@ "config-pg-test-error": "Não foi possível criar uma ligação à base de dados $1: $2", "config-sqlite-dir": "Diretório de dados do SQLite:", "config-sqlite-dir-help": "O SQLite armazena todos os dados num único ficheiro.\n\nDurante a instalação, o servidor de Internet precisa de ter permissão de escrita no diretório que especificar.\n\nEste diretório não deve poder ser acedido diretamente da Internet, por isso está a ser colocado onde estão os seus ficheiros PHP.\n\nJuntamente com o diretório, o instalador irá criar um ficheiro .htaccess, mas se esta operação falhar é possível que alguém venha a ter acesso direto à base de dados.\nIsto inclui acesso aos dados dos utilizadores (endereços de correio eletrónico, palavras-passe encriptadas), às revisões eliminadas e a outros dados de acesso restrito na wiki.\n\nConsidere colocar a base de dados num local completamente diferente, como, por exemplo, em /var/lib/mediawiki/asuawiki.", - "config-oracle-def-ts": "Tablespace padrão:", - "config-oracle-temp-ts": "Tablespace temporário:", "config-type-mysql": "MariaDB, MySQL (ou compatível)", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "O MediaWiki suporta as seguintes plataformas de base de dados:\n\n$1\n\nSe a plataforma que pretende usar não está listada abaixo, siga as instruções nas hiperligações acima para ativar o suporte.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] é a base de dados preferida para o MediaWiki e a melhor suportada. O MediaWiki também trabalha com [{{int:version-db-mysql-url}} MySQL] e [{{int:version-db-percona-url}} Percona Server], que são compatíveis com MariaDB. ([https://www.php.net/manual/pt_BR/mysqli.installation.php Como compilar PHP com suporte para MySQL].)", "config-dbsupport-postgres": "* O [{{int:version-db-postgres-url}} PostgreSQL] é uma plataforma popular de base de dados de código aberto, alternativa ao MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Como compilar PHP com suporte para PostgreSQL].)", "config-dbsupport-sqlite": "* O [{{int:version-db-sqlite-url}} SQLite] é uma plataforma de base de dados ligeira muito bem suportada. ([https://www.php.net/manual/en/pdo.installation.php Como compilar PHP com suporte para SQLite], usa PDO.)", - "config-dbsupport-oracle": "* A [{{int:version-db-oracle-url}} Oracle] é uma base de dados comercial para empresas. ([https://www.php.net/manual/en/oci8.installation.php Como compilar PHP com suporte para OCI8].)", - "config-dbsupport-mssql": "* O [{{int:version-db-mssql-url}} Microsoft SQL Server] é uma base de dados comercial do Windows para empresas. ([https://www.php.net/manual/en/sqlsrv.installation.php Como compilar PHP com suporte para SQLSRV].)", "config-header-mysql": "Definições MariaDB/MySQL", "config-header-postgres": "Definições PostgreSQL", "config-header-sqlite": "Definições SQLite", - "config-header-oracle": "Definições Oracle", - "config-header-mssql": "Configurações do Microsoft SQL Server", "config-invalid-db-type": "O tipo de base de dados é inválido", "config-missing-db-name": "Tem de introduzir um valor para \"{{int:config-db-name}}\".", "config-missing-db-host": "Tem de introduzir um valor para \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Tem de introduzir um valor para \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "O TNS da base de dados, \"$1\", é inválido.\nUse \"TNS Name\" ou o método \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Métodos de Configuração da Conectividade em Oracle])", "config-invalid-db-name": "O nome da base de dados, \"$1\", é inválido.\nUse só letras (a-z, A-Z), algarismos (0-9), sublinhados (_) e hífens (-) dos caracteres ASCII.", "config-invalid-db-prefix": "O prefixo da base de dados, \"$1\", é inválido.\nUse só letras (a-z, A-Z), algarismos (0-9), sublinhados (_) e hífens (-) dos caracteres ASCII.", "config-connection-error": "$1.\n\nVerifique o servidor, o nome do utilizador e a palavra-passe e tente novamente. Se estiver a usar \"localhost\" como servidor da base de dados, tente antes usar \"127.0.0.1\" (ou vice-versa).", "config-invalid-schema": "O esquema ''(schema)'' do MediaWiki, \"$1\", é inválido.\nUse só letras (a-z, A-Z), algarismos (0-9) e sublinhados (_) dos caracteres ASCII.", - "config-db-sys-create-oracle": "O instalador só permite criar uma conta nova usando uma conta SYSDBA.", - "config-db-sys-user-exists-oracle": "A conta \"$1\" já existe. A conta SYSDBA só pode criar uma conta nova!", "config-postgres-old": "É necessário o PostgreSQL $1 ou posterior; tem a versão $2.", - "config-mssql-old": "É necessário o Microsoft SQL Server $1 ou posterior. Tem a versão $2.", "config-sqlite-name-help": "Escolha o nome que identificará a sua wiki.\nNão use espaços ou hífens.\nEste nome será usado como nome do ficheiro de dados do SQLite.", "config-sqlite-parent-unwritable-group": "Não é possível criar o diretório de dados $1, porque o servidor de internet não tem permissão de escrita no diretório que o contém $2.\n\nO instalador determinou em que nome de utilizador o seu servidor de internet está a correr.\nPara continuar, configure o diretório $3 para poder ser escrito por este utilizador.\nPara fazê-lo em sistemas Unix ou Linux, use:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Não é possível criar o diretório de dados $1, porque o servidor de internet não tem permissão de escrita no diretório que o contém $2.\n\nNão foi possível determinar em que nome de utilizador o seu servidor de internet está a correr.\nPara continuar, configure o diretório $3 para que este possa ser globalmente escrito por esse utilizador (e por outros!).\nPara fazê-lo em sistemas Unix ou Linux, use:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -185,11 +168,6 @@ "config-mysql-engine": "Motor de armazenamento:", "config-mysql-innodb": "InnoDB (recomendado)", "config-mysql-engine-help": "InnoDB é quase sempre a melhor opção, porque suporta bem acessos simultâneos (concurrency).\n\nMyISAM pode ser mais rápido no modo de utilizador único ou em instalações somente para leitura.\nAs bases de dados MyISAM tendem a perder integridade de dados com mais frequência do que as bases de dados InnoDB.", - "config-mssql-auth": "Tipo de autenticação:", - "config-mssql-install-auth": "Selecione o tipo de autenticação a usar para ligar à base de dados durante o processo de instalação.\nSe selecionar \"{{int:config-mssql-windowsauth}}\", serão usadas as credenciais do utilizador com que o servidor de Internet está a ser executado.", - "config-mssql-web-auth": "Selecione o tipo de autenticação que o servidor de Internet irá usar para se ligar ao servidor da base de dados durante a operação normal da wiki.\nSe selecionar \"{{int:config-mssql-windowsauth}}\", serão usadas as credenciais do utilizador com que o servidor de Internet está a ser executado.", - "config-mssql-sqlauth": "Autenticação do SQL Server", - "config-mssql-windowsauth": "Autenticação do Windows", "config-site-name": "Nome da wiki:", "config-site-name-help": "Este nome aparecerá no título da janela do seu navegador e em vários outros sítios.", "config-site-name-blank": "Introduza o nome do sítio.", diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json index 039cd263af..42211b499f 100644 --- a/includes/installer/i18n/qqq.json +++ b/includes/installer/i18n/qqq.json @@ -106,13 +106,9 @@ "config-db-type": "Field label in the MediaWiki installer followed by possible database types.", "config-db-host": "Used as label.\n\nAlso used in {{msg-mw|Config-missing-db-host}}.", "config-db-host-help": "{{doc-singularthey}}", - "config-db-host-oracle": "TNS = [[w:Transparent Network Substrate]].\n\nUsed as label.\n\nAlso used in {{msg-mw|Config-missing-db-server-oracle}}.", - "config-db-host-oracle-help": "See also:\n* {{msg-mw|Config-invalid-db-server-oracle}}", "config-db-wiki-settings": "This is more acurate: \"Enter identifying or distinguishing data for this wiki\" since a MySQL database can host tables of several wikis.", "config-db-name": "Used as label.\n\nAlso used in {{msg-mw|Config-missing-db-name}}.\n{{Identical|Database name}}", "config-db-name-help": "Help box text in the MediaWiki installer.", - "config-db-name-oracle": "Field label in the MediaWiki installer where an Oracle database schema can be specified.", - "config-db-account-oracle-warn": "A \"[[:wikipedia:Front and back ends|backend]]\" is a system or component that ordinary users don't interact with directly and don't need to know about, and that is responsible for a distinct task or service - for example, a storage back-end is a generic system for storing data which other applications can use. Possible alternatives for back-end are \"system\" or \"service\", or (depending on context and language) even leave it untranslated.", "config-db-install-account": "Legend in the MediaWiki installer for the section where database username and password have to be provided.", "config-db-username": "Used as label.", "config-db-password": "Field label in the MediaWiki installer where database password has to be provided.", @@ -131,37 +127,24 @@ "config-pg-test-error": "Parameters:\n* $1 - database name\n* $2 - error message", "config-sqlite-dir": "Field label for a folder location.", "config-sqlite-dir-help": "{{doc-important|Do not translate .htaccess and /var/lib/mediawiki/yourwiki.}}\nUsed in help box.", - "config-oracle-def-ts": "Field label for an Oracle default tablespace.", - "config-oracle-temp-ts": "Field label for an Oracle temporary tablespace.", "config-type-mysql": "\"Or compatible\" refers to several database systems that are compatible with MySQL, as explained in {{msg-mw|config-dbsupport-mysql}}, and thus also work with this choice of database type.", "config-type-postgres": "{{optional}}", "config-type-sqlite": "{{optional}}", - "config-type-oracle": "{{optional}}", - "config-type-mssql": "{{optional}}", - "config-support-info": "Parameters:\n* $1 - a list of DBMSs that MediaWiki supports, composed with config-dbsupport-* messages.\nSee also:\n* {{msg-mw|Config-dbsupport-mysql}}\n* {{msg-mw|Config-dbsupport-postgres}}\n* {{msg-mw|Config-dbsupport-oracle}}\n* {{msg-mw|Config-dbsupport-sqlite}}\n* {{msg-mw|Config-dbsupport-mssql}}", + "config-support-info": "Parameters:\n* $1 - a list of DBMSs that MediaWiki supports, composed with config-dbsupport-* messages.\nSee also:\n* {{msg-mw|Config-dbsupport-mysql}}\n* {{msg-mw|Config-dbsupport-postgres}}\n* {{msg-mw|Config-dbsupport-sqlite}}", "config-dbsupport-mysql": "Used in:\n* {{msg-mw|config-support-info}}\n{{Related|Config-dbsupport}}", "config-dbsupport-postgres": "Used in:\n* {{msg-mw|config-support-info}}\n{{Related|Config-dbsupport}}", "config-dbsupport-sqlite": "Used in:\n* {{msg-mw|config-support-info}}\n{{Related|Config-dbsupport}}", - "config-dbsupport-oracle": "Used in:\n* {{msg-mw|Config-support-info}}.\n{{Related|Config-dbsupport}}", - "config-dbsupport-mssql": "Used in:\n* {{msg-mw|Config-support-info}}\n{{Related|Config-dbsupport}}", "config-header-mysql": "Header for MySQL database settings in the MediaWiki installer.", "config-header-postgres": "Header for PostgreSQL database settings in the MediaWiki installer.", "config-header-sqlite": "Header for SQLite database settings in the MediaWiki installer.", - "config-header-oracle": "Header for Oracle database settings in the MediaWiki installer.", - "config-header-mssql": "Used as a section heading on the installer form, inside of a fieldset", "config-invalid-db-type": "Error message in MediaWiki installer when an invalid database type has been provided.", "config-missing-db-name": "Refers to {{msg-mw|Config-db-name}}.\n{{Related|Config-missing}}", "config-missing-db-host": "Refers to {{msg-mw|Config-db-host}}.\n{{Related|Config-missing}}", - "config-missing-db-server-oracle": "Refers to {{msg-mw|Config-db-host-oracle}}.\n{{Related|Config-missing}}", - "config-invalid-db-server-oracle": "Used as error message. Parameters:\n* $1 - database server name\nSee also:\n* {{msg-mw|Config-db-host-oracle-help}}", "config-invalid-db-name": "Used as error message. Parameters:\n* $1 - database name\nSee also:\n* {{msg-mw|Config-invalid-db-prefix}}", "config-invalid-db-prefix": "Used as error message. Parameters:\n* $1 - database prefix\nSee also:\n* {{msg-mw|Config-invalid-db-name}}", "config-connection-error": "$1 is the external error from the database, such as \"DB connection error: Access denied for user 'dba'@'localhost' (using password: YES) (localhost).\"\n\nIf you're translating this message to a right-to-left language, consider writing
$1.
. (When the bidi features for HTML5 will be implemented in the browsers, it will probably be a good idea to write it as
$1.
.)", "config-invalid-schema": "*$1 - schema name", - "config-db-sys-create-oracle": "Error message in the MediaWiki installer when Oracle is used as database and an incorrect user account type has been provided.", - "config-db-sys-user-exists-oracle": "Used as error message. Parameters:\n* $1 - database username", "config-postgres-old": "Used as error message. Used as warning. Parameters:\n* $1 - minimum version\n* $2 - the version of PostgreSQL that has been installed\n{{Related|Config-old}}", - "config-mssql-old": "Used as an error message. Parameters:\n* $1 - minimum version\n* $2 - the version of Microsoft SQL Server that has been installed\n{{Related|Config-old}}", "config-sqlite-name-help": "Help text for the form field for the SQLite data file name.", "config-sqlite-parent-unwritable-group": "Used as SQLite error message. Parameters:\n* $1 - data directory\n* $2 - \"dirname\" part of $1\n* $3 - \"basename\" part of $1\n* $4 - web server's primary group name\nSee also:\n* {{msg-mw|Config-sqlite-parent-unwritable-nogroup}}", "config-sqlite-parent-unwritable-nogroup": "Used as SQLite error message. Parameters:\n* $1 - data directory\n* $2 - \"dirname\" part of $1\n* $3 - \"basename\" part of $1\nSee also:\n* {{msg-mw|Config-sqlite-parent-unwritable-group}}", @@ -186,11 +169,6 @@ "config-mysql-engine": "Field label for MySQL storage engine in the MediaWiki installer.", "config-mysql-innodb": "Option for the MySQL storage engine in the MediaWiki installer.", "config-mysql-engine-help": "Help text in MediaWiki installer with advice for picking a MySQL storage engine.", - "config-mssql-auth": "Radio button group label.\n\nFollowed by the following radio button labels:\n* {{msg-mw|Config-mssql-sqlauth}}\n* {{msg-mw|Config-mssql-windowsauth}}", - "config-mssql-install-auth": "Used as the help text for the \"Authentication type\" radio button when typing in database settings for installation.\n\nRefers to {{msg-mw|Config-mssql-windowsauth}}.\n\nSee also:\n* {{msg-mw|Config-mssql-web-auth}}", - "config-mssql-web-auth": "Used as the help text for the \"Authentication type\" radio button when typing in database settings for normal wiki usage.\n\nRefers to {{msg-mw|Config-mssql-windowsauth}}.\n\nSee also:\n* {{msg-mw|Config-mssql-install-auth}}", - "config-mssql-sqlauth": "Radio button.\n\n\"SQL Server\" refers to \"Microsoft SQL Server\".\n\nSee also:\n* {{msg-mw|Config-mssql-windowsauth}}", - "config-mssql-windowsauth": "Radio button. The official term is \"Integrated Windows Authentication\" but Microsoft itself uses \"Windows Authentication\" elsewhere in Microsoft SQL Server as a synonym.\n\nAlso used in:\n* {{msg-mw|Config-mssql-install-auth}}\n* {{msg-mw|Config-mssql-web-auth}}\n\nSee also:\n* {{msg-mw|Config-mssql-sqlauth}}", "config-site-name": "Field label for the form field where a wiki name has to be entered.", "config-site-name-help": "Help text for the form field where a wiki name has to be entered.", "config-site-name-blank": "Error text in the MediaWiki installer when the site name is left empty.", diff --git a/includes/installer/i18n/ro.json b/includes/installer/i18n/ro.json index fb68b305ad..a6e9ddb146 100644 --- a/includes/installer/i18n/ro.json +++ b/includes/installer/i18n/ro.json @@ -78,10 +78,8 @@ "config-no-uri": "Eroare: Nu pot determina URI-ul curent.\nInstalare întreruptă.", "config-db-type": "Tipul bazei de date:", "config-db-host": "Gazdă bază de date:", - "config-db-host-oracle": "Baza de date TNS:", "config-db-wiki-settings": "Identificați acest wiki", "config-db-name": "Numele bazei de date (fără cratime):", - "config-db-name-oracle": "Schema bazei de date:", "config-db-install-account": "Contul de utilizator pentru instalare", "config-db-username": "Nume de utilizator pentru baza de date:", "config-db-password": "Parola bazei de date:", @@ -94,19 +92,13 @@ "config-db-port": "Portul bazei de date:", "config-db-schema": "Schema pentru MediaWiki (fără cratime):", "config-sqlite-dir": "Director de date SQLite:", - "config-oracle-def-ts": "Spațiu de stocare („tablespace”) implicit:", - "config-oracle-temp-ts": "Spațiu de stocare („tablespace”) temporar:", "config-type-mysql": "MariaDB, MySQL sau compatibil", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "Setările MariaDB/MySQL", "config-header-postgres": "Setări PostgreSQL", "config-header-sqlite": "Setări SQLite", - "config-header-oracle": "Setări Oracle", - "config-header-mssql": "Setări Microsoft SQL Server", "config-invalid-db-type": "Tip de bază de date incorect", "config-missing-db-name": "Trebuie să introduceți o valoare pentru „{{int:config-db-name}}”.", "config-missing-db-host": "Trebuie să introduceți o valoare pentru „{{int:config-db-host}}”.", - "config-missing-db-server-oracle": "Trebuie să introduceți o valoare pentru „{{int:config-db-host-oracle}}”.", "config-connection-error": "$1.\n\nVerificați hostul, numele de utilizator și parola și reîncercați. Dacă folosiți „localhost” drept host al bazei de date, încercați mai bine „127.0.0.1” (sau invers).", "config-upgrade-done-no-regenerate": "Actualizare completă.\n\nAcum puteți [$1 începe să vă folosiți wikiul].", "config-regenerate": "Regenerare LocalSettings.php →", @@ -115,7 +107,6 @@ "config-db-web-create": "Creați contul dacă nu există deja", "config-mysql-engine": "Motor de stocare:", "config-mysql-innodb": "InnoDB (recomandat)", - "config-mssql-auth": "Tip de autentificare:", "config-site-name": "Numele wikiului:", "config-site-name-blank": "Introduceți un nume pentru sit.", "config-project-namespace": "Spațiul de nume al proiectului:", diff --git a/includes/installer/i18n/roa-tara.json b/includes/installer/i18n/roa-tara.json index df1ca1adc6..d56298bfc1 100644 --- a/includes/installer/i18n/roa-tara.json +++ b/includes/installer/i18n/roa-tara.json @@ -40,8 +40,6 @@ "config-env-hhvm": "HHVM $1 ha state installate.", "config-outdated-sqlite": "Iapre l'uecchjie: tu è SQLite $2, ca jè 'na versione troppe vecchie respette a quedda minime $1. SQLite non g'è disponibbele.", "config-db-type": "Tipe de database:", - "config-db-host-oracle": "Database TNS:", - "config-db-name-oracle": "Scheme d'u database:", "config-db-username": "Nome utende d'u database:", "config-db-password": "Password d'u database:", "config-db-port": "Porte d'u database:", @@ -49,13 +47,9 @@ "config-type-mysql": "MariaDFB, MySQL, o combatibbile", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "'Mbostaziune de MariaDB/MySQL", "config-header-postgres": "'Mbostaziune de PostgreSQL", "config-header-sqlite": "'Mbostaziune de SQLite", - "config-header-oracle": "'Mbostaziune de Oracle", - "config-header-mssql": "'Mbostaziune de Microsoft SQL Server", "config-invalid-db-type": "Tipe de database invalide.", "config-mysql-innodb": "InnoDB (conzigliate)", "config-ns-generic": "Proggette", diff --git a/includes/installer/i18n/ru.json b/includes/installer/i18n/ru.json index 03ef206bd5..3343d15768 100644 --- a/includes/installer/i18n/ru.json +++ b/includes/installer/i18n/ru.json @@ -112,13 +112,9 @@ "config-db-type": "Тип базы данных:", "config-db-host": "Хост базы данных:", "config-db-host-help": "Если ваш сервер базы данных находится на другом сервере, введите здесь его имя хоста или IP-адрес.\n\nЕсли вы используете совместный виртуальный хостинг, ваш провайдер хостинга должен сообщить вам правильное имя хоста в своей документации.\n\nЕсли вы используете MySQL, «localhost» может не подойти в качестве имени сервера. В этом случае попробуйте указать 127.0.0.1 в качестве локального IP-адреса.\n\nЕсли вы используете PostgreSQL, оставьте это поле пустым для подключения через сокет Unix.", - "config-db-host-oracle": "TNS базы данных:", - "config-db-host-oracle-help": "Введите действительный [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; файл tnsnames.ora должен быть видимым для этой инсталляции.
При использовании клиентских библиотек версии 10g и старше также возможно использовать метод именования [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Идентификация этой вики", "config-db-name": "Имя базы данных (без дефисов):", "config-db-name-help": "Выберите название-идентификатор для вашей вики.\nОно не должно содержать пробелов.\n\nЕсли вы используете виртуальный хостинг, провайдер или выдаст вам конкретное имя базы данных, или позволит создавать базы данных с помощью панели управления.", - "config-db-name-oracle": "Схема базы данных:", - "config-db-account-oracle-warn": "Поддерживаются три сценария установки Oracle в качестве базы данных:\n\nЕсли вы хотите создать учётную запись базы данных в процессе установки, пожалуйста, укажите учётную запись роли SYSDBA для установки и укажите желаемые полномочия учётной записи с веб-доступом. вы также можете учётную запись с веб-доступом вручную и указать только её (если у неё есть необходимые разрешения на создание объектов схемы) или указать две учётные записи, одну с правами создания объектов, а другую с ограничениями для веб-доступа.\n\nСценарий для создания учётной записи с необходимыми привилегиями можно найти в папке «maintenance/oracle/» этой программы установки. Имейте в виду, что использование ограниченной учётной записи приведёт к отключению всех возможностей обслуживания с учётной записи по умолчанию.", "config-db-install-account": "Учётная запись для установки", "config-db-username": "Имя пользователя базы данных:", "config-db-password": "Пароль базы данных:", @@ -137,37 +133,24 @@ "config-pg-test-error": "Не удаётся подключиться к базе данных $1: $2", "config-sqlite-dir": "Директория данных SQLite:", "config-sqlite-dir-help": "SQLite хранит все данные в одном файле.\n\nДиректория, указываемая вами, должна быть доступна для записи веб-сервером во время установки.\n\nОна '''не должна''' быть доступна через Интернет, поэтому не должна совпадать с той, где хранятся PHP файлы.\n\nУстановщик запишет в эту директорию файл .htaccess, но если это не сработает, кто-нибудь может получить доступ ко всей базе данных.\nВ этой базе находится в том числе и информация о пользователях (адреса электронной почты, хэши паролей), а также удалённые страницы и другие секретные данные о вики.\n\nПо возможности, расположите базу данных где-нибудь в стороне, например, в /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Пространство таблиц по умолчанию:", - "config-oracle-temp-ts": "Временное пространство таблиц:", "config-type-mysql": "MariaDB, MySQL или совместимая", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki поддерживает следующие СУБД:\n\n$1\n\nЕсли вы не видите своей системы хранения данных в этом списке, следуйте инструкциям, на которые есть ссылка выше, чтобы получить поддержку.", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] — основная база данных для MediaWiki, которая поддерживается лучше всего. MediaWiki также работает с [{{int:version-db-mariadb-url}} MariaDB] и [{{int:version-db-percona-url}} Percona Server], которые являются MariaDB-совместимыми. (См.[https://www.php.net/manual/ru/mysql.installation.php Как собрать PHP с поддержкой MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] — популярная СУБД с открытым исходным кодом, альтернатива MySQL. ([https://www.php.net/manual/ru/pgsql.installation.php Как собрать PHP с поддержкой PostgreSQL]).", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] — это легковесная система баз данных, имеющая очень хорошую поддержку. ([https://www.php.net/manual/ru/pdo.installation.php Как собрать PHP с поддержкой SQLite], работающей посредством PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] — это коммерческая корпоративная база данных. ([https://www.php.net/manual/ru/oci8.installation.php Как собрать PHP с поддержкой OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] — это коммерческая корпоративная база данных для Windows. ([https://www.php.net/manual/ru/sqlsrv.installation.php Как собрать PHP с поддержкой SQLSRV])", "config-header-mysql": "Настройки MariaDB/MySQL", "config-header-postgres": "Настройки PostgreSQL", "config-header-sqlite": "Настройки SQLite", - "config-header-oracle": "Настройки Oracle", - "config-header-mssql": "Параметры Microsoft SQL Server", "config-invalid-db-type": "Неверный тип базы данных", "config-missing-db-name": "Вы должны ввести значение «{{int:config-db-name}}».", "config-missing-db-host": "Необходимо ввести значение параметра «{{int:config-db-host}}».", - "config-missing-db-server-oracle": "Вы должны заполнить поле «{{int:config-db-host-oracle}}»", - "config-invalid-db-server-oracle": "Неверное TNS базы данных «$1».\nИспользуйте либо «TNS Name», либо строку «Easy Connect» ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Методы наименования Oracle])", "config-invalid-db-name": "Неверное имя базы данных «$1».\nИспользуйте только ASCII-символы (a-z, A-Z), цифры (0-9), знак подчёркивания (_) и дефис(-).", "config-invalid-db-prefix": "Неверный префикс базы данных «$1».\nИспользуйте только буквы ASCII (a-z, A-Z), цифры (0-9), знак подчёркивания (_) и дефис (-).", "config-connection-error": "$1.\n\nПроверьте хост, имя пользователя и пароль и попробуйте ещё раз. Если в качестве хоста базы данных используется \"localhost\", попробуйте использовать вместо него \"127.0.0.1\" (или наоборот).", "config-invalid-schema": "Неправильная схема для MediaWiki «$1».\nИспользуйте только ASCII символы (a-z, A-Z), цифры(0-9) и знаки подчёркивания(_).", - "config-db-sys-create-oracle": "Программа установки поддерживает только использование SYSDBA для создания новой учётной записи.", - "config-db-sys-user-exists-oracle": "Учётная запись «$1». SYSDBA может использоваться только для создания новой учётной записи!", "config-postgres-old": "Необходим PostgreSQL $1 или более поздняя версия. У вас установлен PostgreSQL $2.", - "config-mssql-old": "Требуется Microsoft SQL Server версии $1 или более поздней. У вас установлена версия $2.", "config-sqlite-name-help": "Выберите имя-идентификатор для вашей вики.\nНе используйте дефисы и пробелы.\nЭта строка будет использоваться в имени файла SQLite.", "config-sqlite-parent-unwritable-group": "Не удалось создать директорию данных $1, так как у веб-сервера нет прав записи в родительскую директорию $2.\n\nУстановщик определил пользователя, под которым работает веб-сервер.\nСделайте директорию $3 доступной для записи и продолжите.\nВ Unix/Linux системе выполните:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Не удалось создать директорию для данных $1, так как у веб-сервера нет прав на запись в родительскую директорию $2.\n\nПрограмма установки не смогла определить пользователя, под которым работает веб-сервер.\nДля продолжения сделайте каталог $3 глобально доступным для записи серверу (и другим).\nВ Unix/Linux сделайте:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -192,11 +175,6 @@ "config-mysql-engine": "Движок базы данных:", "config-mysql-innodb": "InnoDB (рекомендуется)", "config-mysql-engine-help": "'''InnoDB''' почти всегда предпочтительнее, так как он лучше справляется с параллельным доступом.\n\n'''MyISAM''' может оказаться быстрее для вики с одним пользователем или с минимальным количеством поступающих правок, однако базы данных на нём портятся чаще, чем на InnoDB.", - "config-mssql-auth": "Тип аутентификации:", - "config-mssql-install-auth": "Выберите тип проверки подлинности, который будет использоваться для подключения к базе данных во время процесса установки.\nЕсли вы выберите «{{int:config-mssql-windowsauth}}», будут использоваться учётные данные пользователя, под которым работает веб-сервер.", - "config-mssql-web-auth": "Выберите тип проверки подлинности, который веб-сервер будет использовать для подключения к серверу базы данных во время обычного функционирования вики.\nЕсли вы выберите «{{int:config-mssql-windowsauth}}», будут использоваться учётные данные пользователя, под которым работает веб-сервер.", - "config-mssql-sqlauth": "Проверка подлинности SQL Server", - "config-mssql-windowsauth": "Проверка подлинности Windows", "config-site-name": "Название вики:", "config-site-name-help": "Название будет отображаться в заголовке окна браузера и в некоторых других местах вики.", "config-site-name-blank": "Введите название сайта.", diff --git a/includes/installer/i18n/sco.json b/includes/installer/i18n/sco.json index 3fc52abd98..b0a171b09a 100644 --- a/includes/installer/i18n/sco.json +++ b/includes/installer/i18n/sco.json @@ -82,13 +82,9 @@ "config-db-type": "Dâtabase type:", "config-db-host": "Dâtabase host:", "config-db-host-help": "Gif yer database server is oan ae different server, enter the host name or IP address here.\n\nGif ye'r uisin shaired wab hostin, yer hostin provider shid gie ye the richt host name in their documentation.\n\nGif ye'r installin oan ae Windows server n uisin MySQL, uisin \"localhost\" michtna wark fer the server name. Gif it disna, try \"127.0.0.1\" fer the local IP address.\n\nGif ye'r uisin PostgreSQL, lea this field blank tae connect bi wa o ae Unix socket.", - "config-db-host-oracle": "Dâtabase TNS:", - "config-db-host-oracle-help": "Enter ae valid [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; ae tnsnames.ora file maun be veesible til this instawation.
Gif ye'r uisin client libries 10g or newer ye can uise forby the [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect] namin methyd.", "config-db-wiki-settings": "Identifie this wiki", "config-db-name": "Dâtabase name:", "config-db-name-help": "Chuise ae name that identifies yer wiki.\nIt shidna contain spaces.\n\nGif ye'r uisin shaired wab hoastin, yer hoastin provider will either gie ye ae speceefic database name tae uise or let ye mak databases bi waa o ae control panel.", - "config-db-name-oracle": "Dâtabase schema:", - "config-db-account-oracle-warn": "Thaur's three supportit scenaríos fer instawin Oracle aes ae database backend:\n\nGif ye wish tae cræft ae database accoont aes pairt o the instawation process, please supplie aen accoont wi SYSDBA role aes database accoont fer instawation n speceefie the desired creedentials fer the wab-access accoont, itherwise ye can eether cræft the wab-access accoont manuallie n supplie yinlie that accoont (gif it haes the needit permeessions tae cræft the schema objects) or supplie twa differant accoonts, yin wi cræft preevileges n ae restreectit yin fer wab access.\n\nScreept fer cræftin aen accoont wi the needit preevileges can be foond in the \"maintenance/oracle/\" directerie o this instawation. Keep in mynd that uisin ae restreectit accoont will disable aw maintenance capabileeties wi the defaut accoont.", "config-db-install-account": "Uiser accoont fer installâtion", "config-db-username": "Database uisername:", "config-db-password": "Database passwaird:", @@ -107,34 +103,22 @@ "config-pg-test-error": "Canna connect til database $1: $2", "config-sqlite-dir": "SQLite data directerie:", "config-sqlite-dir-help": "SQLite stores aw data in ae single file.\n\nThe directerie ye provide maun be writable bi the wabserver durin instawation.\n\nIt shid no be accessible bi waa o the wab, this is why we'r no puttin it whaur yer PHP files ar.\n\nThe instawer will write ae .htaccess file alang wi it, but gif that fails somebodie can gain access til yer raw database.\nThat incluides raw uiser data (wab-mail addresses, hashed passwairds) aes weel aes delytit reveesions n ither restreected data oan the wiki.\n\nConsider puttin the database some ither place awthegether, fer example in /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Defaut buirdspace:", - "config-oracle-temp-ts": "Temperie buirdspace:", "config-type-mysql": "MaSQL (or compâtible)", - "config-type-mssql": "Micræsaff SQL Server", "config-support-info": "MediaWiki supports the follaein database systems:\n\n$1\n\nGif ye dinna see the database system ye'r tryin tae uise listed ablow, than follae the instructions linked abuin tae enable support.", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] is the primarie tairget fer MediaWiki n is best supported. MediaWiki warks forby wi [{{int:version-db-mariadb-url}} MariaDB] n [{{int:version-db-percona-url}} Percona Server], thir ar MySQL compatible. ([https://www.php.net/manual/en/mysqli.installation.php Hou tae compile PHP wi MySQL support])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] is ae popular apen soorce database system aes aen alternative til MySQL. Thaur micht be some wee bugs still hingin roond, n it's na recommendit fer uiss in ae production environment. ([https://www.php.net/manual/en/pgsql.installation.php Hou tae compile PHP wi PostgreSQL support])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] is ae lichtweicht database system that is ver weel supportit. ([http://www.php.net/manual/en/pdo.installation.php Hou tae compile PHP wi SQLite support], uises PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] is ae commercial enterprise database. ([http://www.php.net/manual/en/oci8.installation.php Hou tae compile PHP wi OCI8 support])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] is ae commercial enterprise database fer Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Hou tae compile PHP wi SQLSRV support])", "config-header-mysql": "MaSQL settins", "config-header-postgres": "PostgreSQL settins", "config-header-sqlite": "SQLite settins", - "config-header-oracle": "Oracle settins", - "config-header-mssql": "Microsoft SQL Server settings", "config-invalid-db-type": "Onvalid database type", "config-missing-db-name": "Ye maun enter ae value fer \"{{int:config-db-name}}\".", "config-missing-db-host": "Ye maun enter ae value fer \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Ye maun enter ae value fer \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "Onvalid database TNS \"$1\".\nUise either \"TNS Name\" or aen \"Easy Connect\" string ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle Naming Methods])", "config-invalid-db-name": "Onvalid database name \"$1\".\nUise yinly ASCII letters (a-z, A-Z), nummers (0-9), unnerscores (_) an hyphens (-).", "config-invalid-db-prefix": "Onvalid database prefix \"$1\".\nUise yinly ASCII letters (a-z, A-Z), nummers (0-9), unnerscores (_) an hyphens (-).", "config-connection-error": "$1.\n\nCheck the host, uisername n passwaird n gie it anither shot.", "config-invalid-schema": "Onvalid schema fer MediaWiki \"$1\".\nUise yinly ASCII letters (a-z, A-Z), nummers (0-9) an unnerscores (_).", - "config-db-sys-create-oracle": "Installer yinly supports usin ae SYSDBA accoont fer makin ae new accoont.", - "config-db-sys-user-exists-oracle": "Uiser accoont \"$1\" awreadie exeests. SYSDBA can yinly be uised fer the makin o ae new accoont!", "config-postgres-old": "PostgreSQL $1 or later is required. Ye hae $2.", - "config-mssql-old": "Microsoft SQL Server $1 or newer is needed. Ye hae $2.", "config-sqlite-name-help": "Chuise ae name that identifies yer wiki.\nDinna uise spaces or hyphens.\nThis will be uised fer the SQLite data file name.", "config-sqlite-parent-unwritable-group": "Canna mak the data directerie $1, cause the parent directerie $2 isna writable bi the wabserver.\n\nThe installer haes determined the uiser yer wabserver is runnin aes.\nMak the $3 directerie writable bi it tae continue.\nOan ae Unix/Linux system dae:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Canna cræft the data directerie $1, cause the pairent directerie $2 isna writable bi the wabserver.\n\nThe instawer coudna determine the uiser yer wabserver is rinnin aes.\nMak the $3 directerie globallie writable bi it (n ithers!) tae continue.\nOan ae Unix/Linux system dae:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -158,11 +142,6 @@ "config-mysql-engine": "Storage engine:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "InnoDB is awmaist aye the best optie, aes it haes guid concurrencie support.\n\nMyISAM micht be faster in single-uiser or read-yinly installâtions.\nMyISAM databases tend tae rot mair aften than InnoDB databases.", - "config-mssql-auth": "Authentication type:", - "config-mssql-install-auth": "Select the authentication type that's tae be uised tae connect wi the database durin the installation process.\nGif ye select \"{{int:config-mssql-windowsauth}}\", the credeentials o whitever uiser the wabserver is rinnin aes will be uised.", - "config-mssql-web-auth": "Select the authentication type that the wab server will uise tae connect wi the database server, durin ordinair operation o the wiki.\nGif ye select \"{{int:config-mssql-winowsauth}}\", the credeentials o whitever uiser the wabserver is rinnin aes will be uised.", - "config-mssql-sqlauth": "SQL Server Authentication", - "config-mssql-windowsauth": "Windows Authentication", "config-site-name": "Name o wiki:", "config-site-name-help": "This will kyth in the title baur o the brouser n in varioos ither places.", "config-site-name-blank": "Enter ae site name.", diff --git a/includes/installer/i18n/sh.json b/includes/installer/i18n/sh.json index 06090ca797..9bab12fbfc 100644 --- a/includes/installer/i18n/sh.json +++ b/includes/installer/i18n/sh.json @@ -87,13 +87,9 @@ "config-db-type": "Tip baze podataka:", "config-db-host": "Domaćin baze podataka:", "config-db-host-help": "Ako je vaša baza podataka na drugom serveru, tada ovdje unesite ime domaćina ili IP adresu.\n\nAko koristite zajednički (deljen) hosting, tada će vaš vjerovnik navesti ispravno ime domaćina u njegovoj dokumentaciji.\n\nAko koristite MySQL, mogućnost \"localhost\" možda neće raditi za serversko ime. U tom slučaju, pokušajte unijeti \"127.0.0.1\" kao lokalnu IP adresu.\n\nAko koristite PostgreSQL, ostavite polje prazno za povezivanje putem Unix priključka.", - "config-db-host-oracle": "TNS baze podataka:", - "config-db-host-oracle-help": "Unesite valjano [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm lokalno ime za povezivanje]. Ovoj uspostavi mora biti vidljiva datotekata tnsnames.ora.
Ako koristite klijentske biblioteke 10g ili novije, tada možete koristiti i metodu imenovanja [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Identifikuj ovaj wiki", "config-db-name": "Ime baze podataka (bez crtica):", "config-db-name-help": "Odaberite ime koje će predstavljati vaš wiki.\nIme ne smije sadržavati razmake.\n\nAko koristite zajednički (deljen) hosting, tada vaš će vam poslodavac dati određeno ime baze podataka za korištenje, ili pak će vas pustiti da pravite baze podataka putem upravljačnice.", - "config-db-name-oracle": "Šema baze podataka:", - "config-db-account-oracle-warn": "Postoje tri podržana scenarija za uspostavu Oraclea kao bazni davatelja usluga:\n\nAko želite stvoriti račun baze podataka kao dio postupka uspostave, navedite račun s SYSDBA-ulogom kao račun za bazu koja se uspostavlja i navedite željene podatke za račun mrežnog pristupa. U drugom slučaju, možete izraditi račun za pristup mreži ručno i navesti samo taj račun (ako postoje dozvole za izradu shematskih objekata) ili pak navesti dva različita računa, jedan s povlasticama izrade, a drugi (ograničeno) za mrežni pristup.\n\nSkriptu za izradu računa s obveznim ovlastima naći ćete u direktorijumu „maintenance/oracle/“ ove uspostave. Imajte na umu da ćete, ako koristite ograničeni račun, onemogućiti sve funkcije održavanja s primarnim računom.", "config-db-install-account": "Korisnički račun za uspostavu", "config-db-username": "Korisničko ime baze podataka:", "config-db-password": "Lozinka baze podataka:", @@ -112,34 +108,22 @@ "config-pg-test-error": "Nije moguće povezati se sa bazom podataka $1: $2", "config-sqlite-dir": "Direktorijum za SQLite-podatke:", "config-sqlite-dir-help": "SQLite pohranjuje sve podatke u jednu datoteku.\n\nDirektorijum što navedete mora biti zapisljiv iz mrežnog servera tijekom uspostave.\n\nTaj je '''ne''' mora biti dostupno putem svemrežja, tako da ne stavljamo gdje su vaše PHP datoteke.\n\nUspostavljač će također stvoriti datoteku .htaccess, ali ako ta ne radi kako treba, tada netko može unijeti vašu neobrađenu (sirovu) bazu podataka.\nTo uključuje neobrađene korisničke podatke (adrese e-pošte, hash lozinke) kao i izbrisane revizije i druge podatke za wiki koji ima ograničen pristup.\n\nPreporučuje se da cijelu bazu smjestite negdje, primjerice /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Podrazumevani tablearni prostor:", - "config-oracle-temp-ts": "Privremeni tabelarni prostor:", "config-type-mysql": "MariaDB, MySQL ili kompatibilan", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki podržava sljedeće sustave baza podataka:\n\n$1\n\nAko sustav koji želite koristiti nije naveden u nastavku, slijedite vezu gore navedenih uputa kako biste omogućili podršku za taj sustav.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] je glavna meta MediaWikija i najbolje je podržan. MediaWiki također radi sa [{{int:version-db-mysql-url}} MySQL-om] i [{{int:version-db-percona-url}} Percona], koji su skladni sa MariaDB-om. ([https://www.php.net/manual/en/mysqli.installation.php Kako kompajlirati PHP sa podrškom MySQL-a])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] je popularan sistem baza podataka otvorenog koda koji predstavlja alternativu MySQL-u. ([https://www.php.net/manual/en/pgsql.installation.php Kako kompajlirati PHP sa podrškom PostgreSQL-a])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] je lagan sistem baze podataka koji je veoma dobro podržan. ([https://www.php.net/manual/en/pdo.installation.php Kako kompajlirati PHP sa podrškom SQLite-a], koristi PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] je baza podataka komercijalnih preduzeća. ([https://www.php.net/manual/en/oci8.installation.php Kako kompajlirati PHP sa podrškom OCI8-a])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] je baza podataka komercijalnih preduzeća za Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Kako kompajlirati PHP sa podrškom SQLSRV-a])", "config-header-mysql": "Podešavanja MariaDB/MySQL-a", "config-header-postgres": "Podešavanja PostgreSQL-a", "config-header-sqlite": "Podešavanja SQLite-a", - "config-header-oracle": "Podešavanja Oracle-a", - "config-header-mssql": "Podešavanja za Microsoft SQL Server", "config-invalid-db-type": "Nevažeći tip baze", "config-missing-db-name": "Morate unijeti vrijednost za \"{{int:config-db-name}}\".", "config-missing-db-host": "Morate unijeti vrijednost za \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Morate unijeti vrijednost za \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "Nevažeći TNS „$1”.\nKoristite ili „TNS Name” ili nisku „Easy Connect”.\n([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle metodi imenovanja]).", "config-invalid-db-name": "Ime baze podataka „$1” nije važeće.\nKoristite samo ASCII-slova (a-z, A-Z), brojeve (0-9) i podvlake (_).", "config-invalid-db-prefix": "Prefiks baze podataka „$1” nije važeći.\nKoristite samo ASCII-slova (a-z, A-Z), brojeve (0-9), podvlake (_) i crtice (-).", "config-connection-error": "$1.\n\nProvjerite host, korisničko ime i lozinku i pokušajte ponovno. Ako kao host baze podataka koristite \"localhost\", zamijenite ga \"127.0.0.1\" (ili obrnuto).", "config-invalid-schema": "Šema za MediaWiki „$1” nije važeća.\nKoristite samo ASCII slova (a-z, A-Z), brojeve (0-9) i podvlake (_).", - "config-db-sys-create-oracle": "Uspostavljač podržava samo upotrebu SYSDBA-računa za pravljenje novih računa.", - "config-db-sys-user-exists-oracle": "Korisnički račun \"$1\" već postoji. SYSDBA samo služi za stvaranje novog računa!", "config-postgres-old": "Zahtijeva se PostgreSQL $1 ili noviji. Vi imate $2.", - "config-mssql-old": "Zahtijeva se Microsoft SQL Server $1 ili novija verzija. Vi imate $2.", "config-sqlite-name-help": "Odaberite ime koje će predstavljati vaš wiki.\nNe koristite razmake i crte.\nOvo će se koristiti za ime datoteke SQLite-podataka.", "config-sqlite-parent-unwritable-group": "Nije moguće izraditi direktorijum $1 \njer mrežni poslužitelj ne može pisati u matični direktorijum $2.\n\nIdentificiran je korisnik pod kojim radi vaš mrežni poslužitelj.\nDa biste nastavili, namjestite da može zapisivati u direktorijum $3.\nNa Unix/Linux sistemu učinite sljedeće:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Nije moguće izraditi direktorijum $1 \njer mrežni poslužitelj ne može pisati u matični direktorijum $2.\n\nUspostavljač nije mogao odrediti korisnika pod kojim radi vaš mrežni poslužitelj.\nDa biste nastavili, postavite toga (i druge!) da biste se globalno zapisivati u direktorijum $3.\nNa Unix/Linux sistemu učinite sljedeće:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -163,9 +147,6 @@ "config-db-web-no-create-privs": "Račun koji ste naveli za uspostavu nema dovoljne privilegije za da stvori račun.\nOvdje morate navesti postojeći račun.", "config-mysql-engine": "Skladišni pogon:", "config-mysql-innodb": "InnoDB (preporučeno)", - "config-mssql-auth": "Tip potvrde identiteta:", - "config-mssql-sqlauth": "Potvrda identiteta za SQL Server", - "config-mssql-windowsauth": "Potvrda identiteta za Windows", "config-site-name": "Ime wikija:", "config-site-name-help": "Ovo će se pojaviti u naslovnoj traci pregledača i na raznim drugim mestima.", "config-project-namespace": "Projektni imenski prostor:", diff --git a/includes/installer/i18n/si.json b/includes/installer/i18n/si.json index fefe7a21d2..6079246459 100644 --- a/includes/installer/i18n/si.json +++ b/includes/installer/i18n/si.json @@ -37,7 +37,6 @@ "config-db-host": "දත්ත සංචිත ධාරක:", "config-db-wiki-settings": "මෙම විකිය හඳුනා ගන්න", "config-db-name": "දත්ත සංචිතයේ නම:", - "config-db-name-oracle": "දත්ත සංචිත සංක්ෂිප්ත නිරූපණය:", "config-db-install-account": "ස්ථාපනය සඳහා පරිශීලක ගිණුම", "config-db-username": "දත්ත සංචිතයේ පරිශීලක නාමය:", "config-db-password": "දත්ත සංචිතයේ මුරපදය:", @@ -47,22 +46,17 @@ "config-db-schema": "මාධ්‍යවිකි සඳහා සංක්ෂිප්ත නිරූපණය:", "config-pg-test-error": "'''$1''' දත්ත සංචිතය වෙත සම්බන්ධ විය නොහැක: $2", "config-sqlite-dir": "SQLite දත්ත නාමවලිය:", - "config-oracle-def-ts": "සාමාන්‍ය වගු අවකාශය:", - "config-oracle-temp-ts": "තාවකාලික වගු අවකාශය:", "config-header-mysql": "MySQL සැකසුම්", "config-header-postgres": "PostgreSQL සැකසුම්", "config-header-sqlite": "SQLite සැකසුම්", - "config-header-oracle": "ඔරකල් සැකසුම්", "config-invalid-db-type": "වලංගු නොවන දත්ත සංචිත වර්ගය", "config-missing-db-name": "\"දත්ත සංචිත නාමය\" සඳහා ඔබ විසින් අගයක් දිය යුතු වේ", "config-missing-db-host": "\"දත්ත සංචිත ධාරකය\" සඳහා ඔබ විසින් අගයක් දිය යුතු වේ", - "config-missing-db-server-oracle": "\"දත්ත සංචිත TNS\" සඳහා ඔබ විසින් අගයක් දිය යුතු වේ", "config-sqlite-name-help": "ඔබගේ විකිය හදුන්වාදෙන නමක් තෝරාගන්න. \nහිස්තැන් හෝ විරාම ලක්ෂණ ‍නොයොදන්න.\nමෙය SQLite දත්ත ගොනුනාමය සදහා යොදා ගනු ඇත.", "config-regenerate": "නැවත ජනිත කරන්න LocalSettings.php →", "config-db-web-account": "ජාල ප්‍රවේශනය සඳහා දත්ත සංචිත ගිණුම", "config-mysql-engine": "ආචයන එන්ජිම:", "config-mysql-innodb": "InnoDB", - "config-mssql-windowsauth": "windows සහතික කිරීම.", "config-site-name": "විකියෙහි නම:", "config-site-name-blank": "අඩවි නාමයක් යොදන්න.", "config-project-namespace": "ව්‍යාපෘතියේ නාමඅවකාශය:", diff --git a/includes/installer/i18n/sk.json b/includes/installer/i18n/sk.json index 1dcd2c1e06..16616cf219 100644 --- a/includes/installer/i18n/sk.json +++ b/includes/installer/i18n/sk.json @@ -41,16 +41,13 @@ "config-env-hhvm": "HHVM $1 je nainštalované.", "config-db-type": "Typ databázy:", "config-db-host": "Databázový server:", - "config-db-host-oracle": "Databázové TNS:", "config-db-wiki-settings": "Identifikácia tejto wiki", "config-db-name": "Názov databázy:", - "config-db-name-oracle": "Databázová schéma:", "config-db-install-account": "Používateľský účet pre inštaláciu", "config-db-username": "Databázové používateľské meno:", "config-db-password": "Databázové heslo:", "config-missing-db-name": "Musíte zadať hodnotu pre \"{{int:config-db-name}}\".", "config-missing-db-host": "Musíte zadať hodnotu pre \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Musíte zadať hodnotu pre \"{{int:config-db-host-oracle}}\".", "config-site-name": "Názov wiki:", "config-site-name-blank": "Zadajte názov stránky.", "config-ns-generic": "Projekt", diff --git a/includes/installer/i18n/sl.json b/includes/installer/i18n/sl.json index 3dd70380a8..cdf7b68f3c 100644 --- a/includes/installer/i18n/sl.json +++ b/includes/installer/i18n/sl.json @@ -59,10 +59,8 @@ "config-using-uri": "Uporabljam URL strežnika \"$1$2\".", "config-db-type": "Vrsta zbirke podatkov:", "config-db-host": "Gostitelj zbirke podatkov:", - "config-db-host-oracle": "TNS zbirke podatkov:", "config-db-wiki-settings": "Prepoznaj ta wiki:", "config-db-name": "Ime zbirke podatkov (brez vezajev):", - "config-db-name-oracle": "Shema zbirke podatkov:", "config-db-install-account": "Uporabniški račun za namestitev", "config-db-username": "Uporabniško ime zbirke podatkov:", "config-db-password": "Geslo zbirke podatkov:", @@ -82,13 +80,9 @@ "config-header-mysql": "Nastavitve MariaDB/MySQL", "config-header-postgres": "Nastavitve PostgreSQL", "config-header-sqlite": "Nastavitve SQLite", - "config-header-oracle": "Nastavitve Oracle", - "config-header-mssql": "nastavitve Microsoft SQL Server", "config-invalid-db-type": "Neveljavna vrsta zbirke podatkov", "config-missing-db-name": "Vnesti morate vrednost za »{{int:config-db-name}}«", "config-missing-db-host": "Vnesti morate vrednost za »{{int:config-db-host}}«.", - "config-missing-db-server-oracle": "Vnesti morate vrednost za »{{int:config-db-host-oracle}}«.", - "config-invalid-db-server-oracle": "Neveljaven TNS zbirke podatkov »$1«.\nUporabite ali \"ime TNS\" ali niz \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Načini poimenovanja Oracle])", "config-invalid-db-name": "Neveljavno ime zbirke podatkov »$1«.\nUporabljajte samo črke ASCII (a-z, A-Z), številke (0-9), podčrtaje (_) in vezaje (-).", "config-invalid-db-prefix": "Neveljavna predpona zbirke podatkov »$1«.\nUporabljajte samo črke ASCII (a-z, A-Z), številke (0-9), podčrtaje (_) in vezaje (-).", "config-connection-error": "$1.\n\nPreverite gostitelja, uporabniško ime in geslo ter poskusite znova. Če kot gostitelja zbirke podatkov uporabljate »localhost«, poskusite namesto tega uporabiti »127.0.0.1« (ali obratno).", @@ -105,7 +99,6 @@ "config-db-web-create": "Ustvari račun, če že ne obstaja", "config-mysql-engine": "Pogon skladiščenja:", "config-mysql-innodb": "InnoDB (priporočeno)", - "config-mssql-auth": "Tip avtentikacije:", "config-site-name": "Ime wikija:", "config-site-name-help": "To bo prikazano v naslovni vrstici brskalnika in na drugih različnih mestih.", "config-site-name-blank": "Vnesite ime strani.", diff --git a/includes/installer/i18n/sr-ec.json b/includes/installer/i18n/sr-ec.json index e740511c1f..92eb4c112b 100644 --- a/includes/installer/i18n/sr-ec.json +++ b/includes/installer/i18n/sr-ec.json @@ -81,11 +81,9 @@ "config-using-32bit": "Упозорење: изгледа да ваш систем ради са 32-битним целим бројевима. Ово се [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:32-bit не препоручује].", "config-db-type": "Тип базе података:", "config-db-host": "Хост базе података", - "config-db-host-oracle": "TNS базе података:", "config-db-wiki-settings": "Идентификуј овај вики", "config-db-name": "Име базе података (без цртица):", "config-db-name-help": "Одаберите име које идентификује ваш вики.\nОно не треба да садржи размаке.\n\nАко користите дељени веб-хостинг, ваш добављач услуге хостинга ће вам дати одређено име базе података за коришћење или ће вас пустити да правите базе података путем контролне табле.", - "config-db-name-oracle": "Шема базе података:", "config-db-install-account": "Кориснички налог за инсталацију", "config-db-username": "Корисничко име базе података:", "config-db-password": "Лозинка базе података:", @@ -100,37 +98,24 @@ "config-db-schema-help": "Ова шема обично ће радити добро.\nПромените је само ако знате да је то потребно.", "config-pg-test-error": "Није могуће повезати се са базом података $1: $2", "config-sqlite-dir": "Директоријум SQLite података:", - "config-oracle-def-ts": "Подразумевани табеларни простор:", - "config-oracle-temp-ts": "Привремени табеларни простор:", "config-type-mysql": "MariaDB, MySQL или компатибилан", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki подржава следеће системе база података:\n\n$1\n\nАко не видите систем који покушавате да користите на листи испод, онда пратите повезана упутства изнад како бисте омогућили подршку.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] је примарна мета за Медијавики и најбоље је подржана. Медијавики ради и са [{{int:version-db-mysql-url}} MySQL-ом] и [{{int:version-db-percona-url}} Percona Server-ом], који су компатибилни са MariaDB-ом. ([https://www.php.net/manual/en/mysqli.installation.php Како компајлирати PHP са подршком MySQL-а])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] је популаран систем база података отвореног кода кaо алтернатива MySQL-у. ([https://www.php.net/manual/en/pgsql.installation.php Како компајлирати PHP са подршком PostgreSQL-а])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] је лаган систем базе података који је веома добро подржан. ([https://www.php.net/manual/en/pdo.installation.php Како компајлирати PHP са подршком SQLite-а], користи PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] је база података комерцијалних предузећа. ([https://www.php.net/manual/en/oci8.installation.php Како компајлирати PHP са подршком OCI8-а])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] је база података комерцијалних предузећа за Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Како компајлирати PHP са подршком SQLSRV-а])", "config-header-mysql": "Подешавања MariaDB/MySQL-а", "config-header-postgres": "Подешавања PostgreSQL-а", "config-header-sqlite": "Подешавања SQLite-а", - "config-header-oracle": "Подешавања Oracle-а", - "config-header-mssql": "Подешавања Microsoft SQL Server-а", "config-invalid-db-type": "Тип базе података није важећи.", "config-missing-db-name": "Морате да унесете вредност за „{{int:config-db-name}}”.", "config-missing-db-host": "Морате да унесете вредност за „{{int:config-db-host}}”.", - "config-missing-db-server-oracle": "Морате да унесете вредност за „{{int:config-db-host-oracle}}”.", - "config-invalid-db-server-oracle": "TNS база података „$1” није важећа.\nКористите или „TNS Name” или ниску „Easy Connect”.\n([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle методи именовања]).", "config-invalid-db-name": "Име базе података „$1” није важеће.\nКористите само ASCII слова (a-z, A-Z), бројеве (0-9) и подвлаке (_).", "config-invalid-db-prefix": "Префикс базе података „$1” није важећи.\nКористите само ASCII слова (a-z, A-Z), бројеве (0-9), подвлаке (_) и цртице (-).", "config-connection-error": "$1.\n\nПроверите хост, корисничко име и лозинку, па покушајте поново.", "config-invalid-schema": "Шема за MediaWiki „$1” није важећа.\nКористите само ASCII слова (a-z, A-Z), бројеве (0-9) и подвлаке (_).", - "config-db-sys-create-oracle": "Инсталациони програм подржава само коришћење SYSDBA налога за отварање новог.", - "config-db-sys-user-exists-oracle": "Кориснички налог „$1” већ постоји. SYSDBA се само може користити за отварање новог налога!", "config-postgres-old": "Неопходан је PostgreSQL $1 или новији. Ви имате $2.", - "config-mssql-old": "Неопходан је Microsoft SQL Server $1 или новији. Ви имате $2.", "config-sqlite-name-help": "Одаберите име које идентификује ваш вики.\nНе користите размаке или цртице.\nОво ће се користити за име датотеке SQLite података.", "config-sqlite-mkdir-error": "Грешка при прављењу директоријума са подацима „$1”.\nПроверите локацију, па покушајте поново.", "config-sqlite-dir-unwritable": "Није могуће уписати у директоријум „$1”.\nПромените му дозволе, тако да веб-сервер може да уписује у њему, па покушајте поново.", @@ -152,9 +137,6 @@ "config-db-web-no-create-privs": "Налог који сте навели за инсталацију нема довољне привилегије да отвори налог.\nНалог који овде наведете већ мора да постоји.", "config-mysql-engine": "Механизам складишта:", "config-mysql-innodb": "InnoDB (препоручено)", - "config-mssql-auth": "Тип потврде идентитета:", - "config-mssql-sqlauth": "SQL Server потврда идентитета", - "config-mssql-windowsauth": "Windows потврда идентитета", "config-site-name": "Име викија:", "config-site-name-help": "Ово ће се појавити у насловној траци прегледача и на разним другим местима.", "config-site-name-blank": "Унесите име локације.", diff --git a/includes/installer/i18n/sr-el.json b/includes/installer/i18n/sr-el.json index 26d60f536a..4ce871e7a5 100644 --- a/includes/installer/i18n/sr-el.json +++ b/includes/installer/i18n/sr-el.json @@ -75,11 +75,9 @@ "config-using-32bit": "Upozorenje: izgleda da vaš sistem radi sa 32-bitnim celim brojevima. Ovo se [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:32-bit ne preporučuje].", "config-db-type": "Tip baze podataka:", "config-db-host": "Host baze podataka", - "config-db-host-oracle": "TNS baze podataka:", "config-db-wiki-settings": "Identifikuj ovaj viki", "config-db-name": "Ime baze podataka (bez crtica):", "config-db-name-help": "Odaberite ime koje identifikuje vaš viki.\nOno ne treba da sadrži razmake.\n\nAko koristite deljeni veb-hosting, vaš dobavljač usluge hostinga će vam dati određeno ime baze podataka za korišćenje ili će vas pustiti da pravite baze podataka putem kontrolne table.", - "config-db-name-oracle": "Šema baze podataka:", "config-db-install-account": "Korisnički nalog za instalaciju", "config-db-username": "Korisničko ime baze podataka:", "config-db-password": "Lozinka baze podataka:", @@ -94,37 +92,24 @@ "config-db-schema-help": "Ova šema obično će raditi dobro.\nPromenite je samo ako znate da je to potrebno.", "config-pg-test-error": "Nije moguće povezati se sa bazom podataka $1: $2", "config-sqlite-dir": "Direktorijum SQLite podataka:", - "config-oracle-def-ts": "Podrazumevani tabelarni prostor:", - "config-oracle-temp-ts": "Privremeni tabelarni prostor:", "config-type-mysql": "MariaDB, MySQL ili kompatibilan", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki podržava sledeće sisteme baza podataka:\n\n$1\n\nAko ne vidite sistem koji pokušavate da koristite na listi ispod, onda pratite povezana uputstva iznad kako biste omogućili podršku.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] je primarna meta za MediaWiki i najbolje je podržana. MediaWiki takođe radi sa [{{int:version-db-mysql-url}} MySQL-om] i [{{int:version-db-percona-url}} Percona Server-om], koji su kompatibilni sa MariaDB-om. ([https://www.php.net/manual/en/mysqli.installation.php Kako kompajlirati PHP sa podrškom MySQL-a])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] je popularan sistem baza podataka otvorenog koda kao alternativa MySQL-u. ([https://www.php.net/manual/en/pgsql.installation.php Kako kompajlirati PHP sa podrškom PostgreSQL-a])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] je lagan sistem baze podataka koji je veoma dobro podržan. ([https://www.php.net/manual/en/pdo.installation.php Kako kompajlirati PHP sa podrškom SQLite-a], koristi PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] je baza podataka komercijalnih preduzeća. ([https://www.php.net/manual/en/oci8.installation.php Kako kompajlirati PHP sa podrškom OCI8-a])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] je baza podataka komercijalnih preduzeća za Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Kako kompajlirati PHP sa podrškom SQLSRV-a])", "config-header-mysql": "Podešavanja MariaDB/MySQL-a", "config-header-postgres": "Podešavanja PostgreSQL-a", "config-header-sqlite": "Podešavanja SQLite-a", - "config-header-oracle": "Podešavanja Oracle-a", - "config-header-mssql": "Podešavanja Microsoft SQL Server-a", "config-invalid-db-type": "Tip baze podataka nije važeći.", "config-missing-db-name": "Morate da unesete vrednost za „{{int:config-db-name}}”.", "config-missing-db-host": "Morate da unesete vrednost za „{{int:config-db-host}}”.", - "config-missing-db-server-oracle": "Morate da unesete vrednost za „{{int:config-db-host-oracle}}”.", - "config-invalid-db-server-oracle": "TNS baza podataka „$1” nije važeća.\nKoristite ili „TNS Name” ili nisku „Easy Connect”.\n([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle metodi imenovanja]).", "config-invalid-db-name": "Ime baze podataka „$1” nije važeće.\nKoristite samo ASCII slova (a-z, A-Z), brojeve (0-9) i podvlake (_).", "config-invalid-db-prefix": "Prefiks baze podataka „$1” nije važeći.\nKoristite samo ASCII slova (a-z, A-Z), brojeve (0-9), podvlake (_) i crtice (-).", "config-connection-error": "$1.\n\nProverite host, korisničko ime i lozinku, pa pokušajte ponovo.", "config-invalid-schema": "Šema za MediaWiki „$1” nije važeća.\nKoristite samo ASCII slova (a-z, A-Z), brojeve (0-9) i podvlake (_).", - "config-db-sys-create-oracle": "Instalacioni program podržava samo korišćenje SYSDBA naloga za otvaranje novog.", - "config-db-sys-user-exists-oracle": "Korisnički nalog „$1” već postoji. SYSDBA se samo može koristiti za otvaranje novog naloga!", "config-postgres-old": "Neophodan je PostgreSQL $1 ili noviji. Vi imate $2.", - "config-mssql-old": "Neophodan je Microsoft SQL Server $1 ili noviji. Vi imate $2.", "config-sqlite-name-help": "Odaberite ime koje identifikuje vaš viki.\nNe koristite razmake ili crtice.\nOvo će se koristiti za ime datoteke SQLite podataka.", "config-sqlite-mkdir-error": "Greška pri pravljenju direktorijuma sa podacima „$1”.\nProverite lokaciju, pa pokušajte ponovo.", "config-sqlite-dir-unwritable": "Nije moguće upisati u direktorijum „$1”.\nPromenite mu dozvole, tako da veb-server može da upisuje u njemu, pa pokušajte ponovo.", @@ -146,9 +131,6 @@ "config-db-web-no-create-privs": "Nalog koji ste naveli za instalaciju nema dovoljne privilegije da otvori nalog.\nNalog koji ovde navedete već mora da postoji.", "config-mysql-engine": "Mehanizam skladišta:", "config-mysql-innodb": "InnoDB (preporučeno)", - "config-mssql-auth": "Tip potvrde identiteta:", - "config-mssql-sqlauth": "SQL Server potvrda identiteta", - "config-mssql-windowsauth": "Windows potvrda identiteta", "config-site-name": "Ime vikija:", "config-site-name-help": "Ovo će se pojaviti u naslovnoj traci pregledača i na raznim drugim mestima.", "config-site-name-blank": "Unesite ime lokacije.", diff --git a/includes/installer/i18n/sv.json b/includes/installer/i18n/sv.json index 45b85457ca..2c8eb7f0ba 100644 --- a/includes/installer/i18n/sv.json +++ b/includes/installer/i18n/sv.json @@ -92,13 +92,9 @@ "config-db-type": "Databastyp:", "config-db-host": "Databasvärd:", "config-db-host-help": "Om din databasserver är på en annan server, ange då värdnamnet eller IP-adressen här.\n\nOm du använder ett delat webbhotell, bör din leverantör ge dig rätt värdnamn i deras dokumentation.\n\nOm du använder MySQL, kanske \"localhost\" inte fungerar för servernamnet. Om det inte gör det försök med \"127.0.0.1\" som den lokala IP-adressen.\n\nOm du använder PostgreSQL, lämna detta fält blankt för att ansluta via en Unix-socket.", - "config-db-host-oracle": "Databas TNS:", - "config-db-host-oracle-help": "Ange ett giltigt [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; en tnsnames.ora-fil måste vara synlig för denna installation.
Om du använder klientbibliotek 10g eller nyare kan du också använda [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect] namngivningsmetoden.", "config-db-wiki-settings": "Identifiera denna wiki", "config-db-name": "Databasnamn (inga bindestreck):", "config-db-name-help": "Välj ett namn som identifierar din wiki.\nDet bör inte innehålla mellanslag.\n\nOm du använder ett delat webbhotell kan de antingen ge dig ett särskilt databasnamn att använda eller så kan de låta dig skapa en databas via kontrollpanelen.", - "config-db-name-oracle": "Databasschema:", - "config-db-account-oracle-warn": "Det finns tre stödda scenarier för installationen av Oracle som en backend-databas:\n\nOm du vill skapa ett databaskonto som en del av installationen, ange ett konto med SYSDBA-roll som databaskonto under installationen och ange de önskade autentiseringsuppgifterna för kontot med webb-åtkomst, annars kan du antingen skapa ett konto med webb-åtkomst manuellt och ange enbart detta konto (om den har behörighet att skapa schema-objekt) eller ange två olika konton, en med create-behörighet och en begränsad för webb-åtkomst.\n\nSkript för att skapa ett konto med de korrekta behörigheterna kan hittas i \"maintenance/oracle/\"-katalogen för denna installation. Tänk på att användningen av ett begränsat konto inaktiverar all underhållsmöjlighet med standardkontot.", "config-db-install-account": "Användarkonto för installation", "config-db-username": "Databas-användarnamn:", "config-db-password": "Databas-lösenord:", @@ -117,34 +113,22 @@ "config-pg-test-error": "Kan inte ansluta till databas '''$1''': $2", "config-sqlite-dir": "SQLite data-katalog:", "config-sqlite-dir-help": "SQLite lagrar all data i en enda fil.\n\nDen katalog du anger måste vara skrivbar av webbservern under installationen.\n\nDet bör inte vara tillgänglig via webben; Det är därför vi inte lägger den där dina PHP-filer är.\n\nInstallationsprogrammet kommer att skriva en .htaccess-fil tillsammans med den, men om det misslyckas kan någon få tillgång till den råa databasen.\nVlken innehåller rå användardata (e-postadresser, hashade lösenord) samt borttagna revideringar och annan begränsad data på wiki.\n\nÖverväga att lägga databasen någon helt annanstans, till exempel i /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Standardtabellutrymme (tablespace):", - "config-oracle-temp-ts": "Tillfälligt tabellutrymme (tablespace):", "config-type-mysql": "MariaDB, MySQL eller kompatibelt", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki stöder följande databassystem:\n\n$1\n\nOm du inte ser det databassystem som du försöker använda nedanstående, följ då instruktionerna länkade ovan för aktivera stöd för det.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] är det primära målet för MediaWiki och stöds bäst. MediaWiki fungerar även med [{{int:version-db-mysql-url}} MySQL] och [{{int:version-db-percona-url}} Percona Server], som är kompatibla med MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Hur man kompilerar PHP med stöd för MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] är ett populärt databassystem med öppen källkod som ett alternativ till MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Hur man kompilerar PHP med PostgreSQL-stöd])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] är en lättviktsdatabassystem med väldigt bra stöd. ([https://www.php.net/manual/en/pdo.installation.php Hur man kompilerar PHP med SQLite stöd], använder PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] är en kommersiellt databas för företag. ([https://www.php.net/manual/en/oci8.installation.php Hur man kompilerar PHP med OCI8 stöd])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] är en kommersiellt databas för företag för Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Hur man kompilerar PHP med SQLSRV stöd])", "config-header-mysql": "MariaDB/MySQL-inställningar", "config-header-postgres": "PostgreSQL-inställningar", "config-header-sqlite": "SQLite-inställningar", - "config-header-oracle": "Oracle-inställningar", - "config-header-mssql": "Inställningar för Microsoft SQL Server", "config-invalid-db-type": "Ogiltig databastyp", "config-missing-db-name": "Du måste ange ett värde för \"{{int:config-db-name}}\".", "config-missing-db-host": "Du måste ange ett värde för \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Du måste ange ett värde för \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "Ogiltig databas-TNS \"$1\".\nAnvända antingen \"TNS Name\" eller en \"Easy Connect\"-sträng ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracles namngivningsmetoder]).", "config-invalid-db-name": "\"$1\" är ett ogiltigt databasnamn.\nAnvänd bara ASCII-bokstäver (a-z, A-Z), siffror (0-9), understreck (_) och bindestreck (-).", "config-invalid-db-prefix": "\"$1\" är ett ogiltigt databasprefix.\nAnvänd bara ASCII-bokstäver (a-z, A-Z), siffror (0-9), understreck (_) och bindestreck (-).", "config-connection-error": "$1.\n\nKontrollera värd, användarnamn och lösenord och försök igen. Om du använder \"localhost\" som databasvärden, försök använda \"127.0.0.1\" istället (eller tvärtom).", "config-invalid-schema": "\"$1\" är ett ogiltigt schema för MediaWiki.\nAnvänd bara ASCII-bokstäver (a-z, A-Z), siffror (0-9), understreck (_) och bindestreck (-).", - "config-db-sys-create-oracle": "Installationsprogrammet stöder endast användningen av ett SYSDBA-konto för att skapa ett nytt konto.", - "config-db-sys-user-exists-oracle": "Användarkontot \"$1\" finns redan. SYSDBA kan endast användas för att skapa ett nytt konto!", "config-postgres-old": "PostgreSQL $1 eller senare krävs, du har $2.", - "config-mssql-old": "Microsoft SQL-server $1 eller senare krävs. Du har $2.", "config-sqlite-name-help": "Välja ett namn som identifierar din wiki.\nAnvänd inte mellanslag eller bindestreck.\nDetta kommer att användas för SQLite-data filnamnet.", "config-sqlite-parent-unwritable-group": "Kan inte skapa datakatalogen $1, då den överordnade katalogen $2 inte är skrivbar för webbservern.\n\nInstallationen har avgjort vilken användare din webbserver körs som.\nGör $3-katalogen skrivbar för den för att fortsätta.\nPå ett Unix/Linux system gör:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Kan inte skapa datakatalogen $1, då den överordnade katalogen $2 inte är skrivbar för webbservern.\n\nInstallationen kunde inte avgöra vilken användare din webbserver körs som.\nGör $3-katalogen skrivbar för den (och andra!) för att fortsätta.\nPå ett Unix/Linux system gör:\n\n
cd $2\nmkdir $3\nchmod g+w $3
", @@ -169,11 +153,6 @@ "config-mysql-engine": "Lagringsmotor:", "config-mysql-innodb": "InnoDB (rekommenderas)", "config-mysql-engine-help": "'''InnoDB''' är nästan alltid det bästa valet eftersom den har ett bra system för samtidiga arbeten.\n\n'''MyISAM''' kan vara snabbare i enanvändarläge eller skrivskyddade installationer.\nMyISAM-databaser tenderar att bli korrupta oftare än InnoDB-databaser.", - "config-mssql-auth": "Autentiseringstyp:", - "config-mssql-install-auth": "Välj autentiseringstypen som kommer att användas för att ansluta till databasen under installationsprocessen.\nOm du väljer \"{{int:config-mssql-windowsauth}}\", kommer autentiseringsuppgifterna för den användare webbservern körs som att användas.", - "config-mssql-web-auth": "Välj autentiseringstypen som kommer att användas för att ansluta till databasen under ordinarie drift av wikin.\nOm du väljer \"{{int:config-mssql-windowsauth}}\", kommer autentiseringsuppgifterna för den användare webbservern körs som att användas.", - "config-mssql-sqlauth": "SQL Server-autentisering", - "config-mssql-windowsauth": "Windows-autentisering", "config-site-name": "Namnet på wikin:", "config-site-name-help": "Detta visas i titelfältet i webbläsaren och på flera andra platser.", "config-site-name-blank": "Ange ett webbplatsnamn.", diff --git a/includes/installer/i18n/tcy.json b/includes/installer/i18n/tcy.json index 84b5b03ec7..64e25f5c9a 100644 --- a/includes/installer/i18n/tcy.json +++ b/includes/installer/i18n/tcy.json @@ -32,7 +32,6 @@ "config-restart": "ಸರಿ,ಕುಡ ಸುರು ಮಲ್ಪುಲೆ", "config-db-type": "ದತ್ತಾಂಶಸಂಚಯ ಮಾದರಿ:", "config-db-host-help": "ಇರೆನ ದತ್ತಸಂಚಯ ಸೇವಕ ಬೇತೆ ಸೇವಕೊ(ಸರ್ವರ್)ಡು ಇತ್ತ್ಂಡ, ಆಶ್ರಯದಾತ ಪುದರು ಇಜಿಂಡ ಐಪಿ ವಿಳಾಸ ಮುಲ್ಪ ಸೇರಾಲೆ.\nಈರ್ ಪಾಲುದ ಜಾಲ ಆಶ್ರಯ ಬಳಸುನಾಂಡಾ, ಇರೆನ ಆಶ್ರಯ ದಾತೆರ್ ಅಕಲೆನ ದಾಖಲಿಕೆಡ್ ಇರೆಗ್ ಸರಿಯಾಯಿನ ಆಶ್ರಯದಾತ ನಾಮ ಕೊರೊಡು.\nಈರ್ MySQL ಬಳಸುನಾಂಡ,\"localhost\" (\"ತಲ-ಆಶ್ರಯದಾತ\")ಬಳಕೆ ಆಶ್ರಯದಾತ ಪುದರುಗು ಬೇಲೆ ಮಲ್ಪಂದ್.ಅವು ಆಯಿಜಿಡ, ತಲ ಐಪಿ ವಿಳಾಸೊಗು \"127.0.0.1\" ಪಾಡ್ದ್ ಪ್ರಯತ್ನ ಮಲ್ಪುಲೆ.\nಈರ್ PostgreSQL ಬಳಸುನಾಂಡ, ಈ ಕ್ಷೇತ್ರೊನು ಖಾಲಿ ಬುಡುದು,ಯುನಿಕ್ಸ್ ಗುರಿತ ಮೂಲಕ ಕೂಡಾಲೆ.", - "config-db-host-oracle": "ದತ್ತಾಂಶಸಂಚಯ TNS:", "config-db-wiki-settings": "ಈ ವಿಕಿಯನ್ನು ಗುರುತಿಸಾಲೆ", "config-db-name": "ಮಾಹಿತಿಕೋಶದ ಪುದರ್(ಕೂಡುಗೆರೆ ದಾಂತೆ):", "config-db-username": "ದತ್ತಾಂಶಸಂಚಯ ಪುದರ್:", diff --git a/includes/installer/i18n/te.json b/includes/installer/i18n/te.json index e8e9a75815..c95759c63e 100644 --- a/includes/installer/i18n/te.json +++ b/includes/installer/i18n/te.json @@ -62,11 +62,9 @@ "config-db-type": "డాటాబేసు రకం:", "config-db-host": "డేటాబేసు హోస్టు:", "config-db-host-help": "మీ డేటాబేసు సర్వరు వేరే సర్వరులో ఉంటే, దాని హోస్ట్ పేరు, ఐపీ చిరునామా ఇక్కడ ఇవ్వండి.\n\nమీరు షేర్‍డ్ వెబ్ హోస్టింగును వాడుతూంటే, మీ హోస్టింగు సేవను అందించేవారు తమ డాక్యుమెంటేషనులో సరైన హోస్ట్ పేరును ఇచ్చి ఉండాలి.\n\nమీరు విండోస్ సర్వరులో స్థాపిస్తూ, MySQL వాడుతూ ఉంటే, సర్వరు పేరుగా \"localhost\" పనిచెయ్యకపోవచ్చు. అపుడు, స్థానిక ఐపీ చిరునామాగా \"127.0.0.1\" వాడండి.\n\nమీరు PostgreSQL వాడుతూ ఉంటే, Unix సాకెట్ ద్వారా కనెక్టయేందుకు ఈ ఫీల్డును ఖాళీగా వదిలెయ్యండి.", - "config-db-host-oracle": "డేటాబేసు TNS:", "config-db-wiki-settings": "ఈ వికీ గుర్తింపును ఇవ్వండి", "config-db-name": "డాటాబేసు పేరు:", "config-db-name-help": "మీ వికీని సూచించే విధంగా ఓ పేరును ఎంచుకోండి.\nదానిలో స్పేసులు ఉండరాదు.\n\nమీరు షేర్‍డ్ వెబ్ హోస్టింగును వాడుతూంటే, మీకు హోస్టింగు సేవనందించేవారు మీకు ఓ డేటాబేసు పేరును గాని, లేదా కంట్రోలు ప్యానెలు ద్వారా ఓ డేటాబేసును సృష్టించుకునే వీలునుగానీ ఇస్తారు.", - "config-db-name-oracle": "డేటాబేసు స్కీమా:", "config-db-install-account": "స్థాపనకి వాడుకరి ఖాతా", "config-db-username": "డేటాబేసు వాడుకరిపేరు:", "config-db-password": "డేటాబేసు సంకేతపదం:", @@ -84,30 +82,21 @@ "config-db-schema-help": "మామూలుగా ఈ స్కీమా సరిపోతుంది.\nఅవసరమని మీకు తెలిస్తేనే మార్చండి.", "config-pg-test-error": "డేటాబేసు $1 కి కనెక్టు కాలేకపోయాం: $2", "config-sqlite-dir": "SQLite డేటా డైరెక్టరీ:", - "config-oracle-def-ts": "డిఫాల్టు టేబుల్‍స్పేసు:", - "config-oracle-temp-ts": "తాత్కాలిక టేబుల్‍స్పేసు:", "config-type-mysql": "MySQL (లేదా సరిపోయేది)", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki కింది డేటాబేసు వ్యవస్థలకు అనుకూలిస్తుంది:\n\n$1\n\nమీరు వాడదలచిన డేటాబేసు వ్యవస్ కింది జాబితాలో లేకపోతే, పైన లింకు ద్వారా ఇచ్చిన సూచనలను పాటించి, అనుకూలతలను సాధించండి.", "config-dbsupport-postgres": "* MySQL కు ప్రత్యామ్నాయంగా [{{int:version-db-postgres-url}} PostgreSQL] ప్రజామోదం పొందిన ఓపెన్‍సోర్సు డేటాబేసు వ్యవస్థ. దానిలో చిన్న చితకా లోపాలుండే అవకాశం ఉంది. అందుచేత దాన్ని ఉత్పాదక రంగంలో వాడవచ్చని చెప్పలేం. ([https://www.php.net/manual/en/pgsql.installation.php How to compile PHP with PostgreSQL support])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] ఓ తేలికైన డేటాబేసు వ్యవస్థ. దానికి చక్కటి అనుకూలతలున్నాయి. ([http://www.php.net/manual/en/pdo.installation.php How to compile PHP with SQLite support], uses PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] ఒక వాణిజ్యపరంగా సంస్థాగతంగా వాడదగ్గ డేటాబేసు. ([http://www.php.net/manual/en/oci8.installation.php How to compile PHP with OCI8 support])", "config-header-mysql": "MySQL అమరికలు", "config-header-postgres": "PostgreSQL అమరికలు", "config-header-sqlite": "SQLite అమరికలు", - "config-header-oracle": "Oracle అమరికలు", - "config-header-mssql": "Microsoft SQL Server అమరికలు", "config-invalid-db-type": "తప్పుడు డాటాబేసు రకం", "config-missing-db-name": "\"{{int:config-db-name}}\" ను తప్పకుండా ఇవ్వాలి", "config-missing-db-host": "\"{{int:config-db-host}}\" ను తప్పకుండా ఇవ్వాలి", - "config-missing-db-server-oracle": "\"{{int:config-db-host-oracle}}\" ను తప్పకుండా ఇవ్వాలి", "config-invalid-db-name": "డేటాబేసు పేరు సరైనది కాదు \"$1\".\nASCII అక్షరాలు (a-z, A-Z), అంకెలు (0-9), క్రీగీత (_) and హైఫన్ (-) లను మాత్రమే వాడాలి.", "config-invalid-db-prefix": "డేటాబేసు ఆదిపదం (ప్రిఫిక్స్) సరైనది కాదు \"$1\".\nASCII అక్షరాలు (a-z, A-Z), అంకెలు (0-9), క్రీగీత (_) and హైఫన్ (-) లను మాత్రమే వాడాలి.", "config-connection-error": "$1.\n\nక్రింది హోస్టు, వాడుకరిపేరు మరియు సంకేతపదాలను ఒకసారి సరిచూసుకుని అప్పుడు ప్రయత్నించండి.", "config-invalid-schema": "\"$1\" MediaWiki కోసం చెల్లని స్కీమా.\nASCII అక్షరాలు (a-z, A-Z), అంకెలు (0-9) క్రీగీత (_) లను మాత్రమే వాడాలి.", - "config-db-sys-user-exists-oracle": "వాడుకరి ఖాతా \"$1\" ఈసరికే ఉంది. కొత్త ఖాతాను సృష్టించేందుకు SYSDBA ను మాత్రమే వాడాలి!", "config-postgres-old": "PostgreSQL $1 గానీ ఆ తరువాతిది గానీ అవసరం. మీకు $2 ఉంది.", - "config-mssql-old": "మైక్రోసాఫ్ట్ SQL సర్వర్ $1 లేదీ దాని తరువాతి వర్షన్ ఉండాలి. మీ దగ్గర $2 ఉంది.", "config-sqlite-name-help": "మీ వికీని గుర్తించే పేరు ఒకదాన్ని ఎంచుకోండి.\nస్పేసులు గానీ, హైఫన్‍లు గానీ వాడకండి.\nదాన్ని SQLite డేటాఫైలు పేరు కోసంవాడతాం.", "config-sqlite-mkdir-error": "డేటా డైరెక్టరీని సృష్టించడంలో లోపం \"$1\".\nస్థానాన్ని సరిచూసి మళ్ళీ ప్రయత్నించండి.", "config-sqlite-connection-error": "$1.\n\nకింద ఉన్న డేటా డైరెక్టరీ, డేటాబేసు పేరును సరిచూసి మళ్ళీ ప్రయత్నించండి.", @@ -124,9 +113,6 @@ "config-db-web-no-create-privs": "స్థాపన కోసం మీరిచ్చిన ఖాతాకు ఓ కొత్త ఖాతాను సృష్టించే అనుమతులు లేవు.\nఇక్కడ మీరిచ్చే ఖాతా తప్పనిసరిగా ఈసరికే ఉనికిలో ఉండాలి.", "config-mysql-engine": "స్టోరేజీ ఇంజను:", "config-mysql-innodb": "InnoDB", - "config-mssql-auth": "ఆథెంటికేషన్ రకం:", - "config-mssql-sqlauth": "SQL Server ఆథెంటికేషన్", - "config-mssql-windowsauth": "విండోస్ ఆథెంటికేషన్", "config-site-name": "వికీ పేరు:", "config-site-name-help": "ఇది బ్రౌజరు టిటిలుబారు లోను, అనేక ఇతర చోట్లా కనిపిస్తుంది.", "config-site-name-blank": "ఓ సైటు పేరును ఇవ్వండి.", diff --git a/includes/installer/i18n/th.json b/includes/installer/i18n/th.json index 38aafbea5a..4512740eea 100644 --- a/includes/installer/i18n/th.json +++ b/includes/installer/i18n/th.json @@ -84,13 +84,9 @@ "config-db-type": "ชนิดฐานข้อมูล:", "config-db-host": "โฮสต์ฐานข้อมูล:", "config-db-host-help": "ถ้าเซิร์ฟเวอร์ฐานข้อมูลของคุณอยู่บนเซิร์ฟเวอร์อื่น ให้ป้อนชื่อโฮสต์หรือที่อยู่ IP ที่นี่\n\nถ้าคุณกำลังใช้งานโฮสต์เว็บที่ใช้ร่วมกัน ผู้ให้บริการโฮสต์ควรให้ชื่อโฮสต์ที่ถูกต้องแก่คุณในเอกสารคู่มือ\n\nถ้าคุณกำลังติดตั้งบนเซิร์ฟเวอร์ Windows และกำลังใช้ MySQL การใช้ \"localhost\" อาจไม่สามารถใช้ได้สำหรับชื่อเซิร์ฟเวอร์ ถ้าไม่สามารถใช้ได้ ให้ลองใช้ \"127.0.0.1\" สำหรับที่อยู่ IP เฉพาะที่", - "config-db-host-oracle": "TNS ฐานข้อมูล:", - "config-db-host-oracle-help": "ป้อน [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name] ที่ถูกต้อง; ไฟล์ tnsnames.ora ต้องสามารถมองเห็นได้โดยการติดตัั้งนี้
ถ้าคุณกำลังใช้ไลบรารีไคลเอนต์ 10g หรือใหม่กว่า คุณก็สามารถใช้วิธีการตั้งชื่อแบบ [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect] ได้เช่นกัน", "config-db-wiki-settings": "ระบุวิกินี้", "config-db-name": "ชื่อฐานข้อมูล:", "config-db-name-help": "เลือกชื่อที่ระบุวิกิของคุณ\nชื่อไม่ควรมีช่องว่าง\n\nถ้าคุณกำลังใช้โฮสต์เว็บที่ใช้ร่วมกัน ผู้ให้บริการโฮสต์ของคุณจะระบุชื่อฐานข้อมูลให้คุณ หรือให้คุณสร้างฐานข้อมูลโดยใช้แผงควบคุม", - "config-db-name-oracle": "แบบแผนฐานข้อมูล:", - "config-db-account-oracle-warn": "มีสถานการณ์สมมติสามสถานการณ์ที่สนับสนุนสำหรับการติดตั้ง Oracle เป็นแบ็กเอนด์ฐานข้อมูล:\n\nถ้าคุณต้องการสร้างบัญชีฐานข้อมูลเป็นส่วนหนึ่งของกระบวนการติดตั้ง โปรดจัดหาบัญชีที่มีบทบาท SYSDBA เป็นบัญชีฐานข้อมูลสำหรับการติดตั้งและระบุข้อมูลประจำตัวที่ต้องการสำหรับบัญชีการเข้าถึงเว็บ หรือคุณสามารถสร้างบัญชีการเข้าถึงเว็บด้วยตนเองและจัดหาเฉพาะบัญชีนั้น (ถ้ามีสิทธิ์ที่ต้องการในการสร้างวัตถุแบบแผน) หรือจัดหาบัญชีสองบัญชี โดยบัญชีหนึ่งใช้สร้างสิทธิ์ และบัญชีที่จำกัดอีกบัญชีหนึ่งสำหรับการเข้าถึงเว็บ\n\nสคริปต์ที่ใช้สำหรับการสร้างบัญชีพร้อมสิทธิ์ที่ต้องการสามารถพบได้ในไดเรกทอรี \"maintenance/oracle/\" ของการติดตั้งนี้\nอย่าลืมว่าการใช้บัญชีที่จำกัดจะเป็นการปิดใช้งานความสามารถในการบำรุงรักษาทั้งหมดด้วยบัญชีเริ่มต้น", "config-db-install-account": "บัญชีผู้ใช้สำหรับการติดตั้ง", "config-db-username": "ชื่อผู้ใช้ฐานข้อมูล:", "config-db-password": "รหัสผ่านฐานข้อมูล:", @@ -109,34 +105,22 @@ "config-pg-test-error": "ไม่สามารถเชื่อมต่อไปยังฐานข้อมูล $1: $2", "config-sqlite-dir": "ไดเรกทอรีข้อมูล SQLite:", "config-sqlite-dir-help": "SQLite จัดเก็บข้อมูลทั้งหมดในไฟล์เดียว\n\nไดเรกทอรีที่คุณระบุจะต้องสามารถเขียนได้โดยเว็บเซิร์ฟเวอร์ระหว่างการติดตั้ง\n\nไดเรกทอรีดังกล่าวไม่ควรสามารถเข้าถึงได้ผ่านเว็บ นี่คือเหตุผลที่เราไม่นำไฟล์ข้อมูลดังกล่าวไปไว้ในตำแหน่งที่มีไฟล์ PHP ของคุณอยู่\n\nโปรแกรมติดตั้งจะเขียนไฟล์ .htaccess ไปพร้อมกับไฟล์ข้อมูลดังกล่าว แต่ถ้าเกิดความล้มเหลว ทุกคนจะสามารถเข้าถึงฐานข้อมูลดิบของคุณได้\nซึ่งรวมถึงข้อมูลผู้ใช้ดิบ (ที่อยู่อีเมล ข้อมูลแฮช) รวมถึงรุ่นปรับปรุงที่ถูกลบไปแล้ว และข้อมูลที่ถูกจำกัดอื่นๆ บนวิกิ\n\nให้พิจารณานำฐานข้อมูลไปไว้ในตำแหน่งอื่น ตัวอย่างเช่น ใน /var/lib/mediawiki/yourwiki", - "config-oracle-def-ts": "พื้นที่ตารางเริ่มต้น:", - "config-oracle-temp-ts": "พื้นที่ตารางชั่วคราว:", "config-type-mysql": "MySQL (หรือที่เข้ากันได้)", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki สนับสนุนระบบฐานข้อมูลต่อไปนี้:\n\n$1\n\nถ้าคุณไม่พบระบบฐานข้อมูลที่คุณกำลังพยายามใช้ในรายการด้านล่างนี้ ให้ทำตามคำแนะนำที่เชื่อมโยงด้านบนเพื่อเปิดใช้งานการสนับสนุน", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] คือเป้าหมายหลักสำหรับ MediaWiki และได้รับการสนับสนุนดีที่สุด MediaWiki ยังคงสามารถใช้ได้ร่วมกับ [{{int:version-db-mariadb-url}} MariaDB] และ [{{int:version-db-percona-url}} Percona Server] ซึ่งเข้ากันได้กับ MySQL ([https://www.php.net/manual/en/mysqli.installation.php วิธีการคอมไพล์ PHP ด้วยการสนับสนุน MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] คือระบบฐานข้อมูลแบบโอเพนซอร์สที่ได้รับความนิยมสูงที่สามารถใช้แทน MySQL ได้ ([https://www.php.net/manual/en/pgsql.installation.php วิธีการคอมไพล์ PHP ด้วยการสนับสนุน PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] คือระบบฐานข้อมูลขนาดเล็กที่ได้รับการสนับสนุนดีมาก ([http://www.php.net/manual/en/pdo.installation.php วิธีการคอมไพล์ PHP ด้วยการสนับสนุน SQLite], ใช้ PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] คือฐานข้อมูลสำหรับองค์กรพาณิชย์ ([http://www.php.net/manual/en/oci8.installation.php วิธีการคอมไพล์ PHP ด้วยการสนับสนุน OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] คือฐานข้อมูลสำหรับองค์กรพาณิชย์สำหรับ Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php วิธีการคอมไพล์ PHP ด้วยการสนับสนุน SQLSRV])", "config-header-mysql": "การตั้งค่า MySQL", "config-header-postgres": "การตั้งค่า PostgreSQL", "config-header-sqlite": "การตั้งค่า SQLite", - "config-header-oracle": "การตั้งค่า Oracle", - "config-header-mssql": "การตั้งค่า Microsoft SQL Server", "config-invalid-db-type": "ชนิดฐานข้อมูลไม่ถูกต้อง", "config-missing-db-name": "คุณต้องป้อนค่าสำหรับ \"{{int:config-db-name}}\"", "config-missing-db-host": "คุณต้องป้อนค่าสำหรับ \"{{int:config-db-host}}\"", - "config-missing-db-server-oracle": "คุณต้องป้อนค่าสำหรับ \"{{int:config-db-host-oracle}}\"", - "config-invalid-db-server-oracle": "TNS ฐานข้อมูล \"$1\" ไม่ถูกต้อง\nให้ใช้สตริง \"ชื่อ TNS\" หรือ \"Easy Connect\"\n ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm วิธีการตั้งชื่อของ Oracle])", "config-invalid-db-name": "ชื่อฐานข้อมูล \"$1\" ไม่ถูกต้อง\nให้ใช้เฉพาะอักษร ASCII (a-z, A-Z) ตัวเลข (0-9) ขีดล่าง (_) และยัติภังค์ (-)", "config-invalid-db-prefix": "คำนำหน้าฐานข้อมูล \"$1\" ไม่ถูกต้อง\nให้ใช้เฉพาะอักษร ASCII (a-z, A-Z) ตัวเลข (0-9) ขีดล่าง (_) และยัติภังค์ (-)", "config-connection-error": "$1\n\nตรวจสอบโฮสต์ ชื่อผู้ใช้และรหัสผ่าน และลองอีกครั้ง", "config-invalid-schema": "แบบแผนสำหรับ MediaWiki \"$1\" ไม่ถูกต้อง\nให้ใช้เฉพาะอักษร ASCII (a-z, A-Z) ตัวเลข (0-9) และขีดล่าง (_)", - "config-db-sys-create-oracle": "โปรแกรมติดตั้งสนับสนุนเฉพาะการใช้บัญชี SYSDBA สำหรับการสร้างบัญชีใหม่เท่านั้น", - "config-db-sys-user-exists-oracle": "มีบัญชีผู้ใช้ \"$1\" อยู่แล้ว คุณสามารถใช้เฉพาะ SYSDBA สำหรับการสร้างบัญชีใหม่ได้เท่านั้น!", "config-postgres-old": "จำเป็นต้องใช้ PostgreSQL $1 หรือสูงกว่า คุณมี $2", - "config-mssql-old": "จำเป็นต้องใช้ Microsoft SQL Server $1 หรือสูงกว่า คุณมี $2.", "config-sqlite-name-help": "เลือกชื่อที่จะระบุวิกิของคุณ\nอย่าใช้ช่องว่างหรือยัติภังค์\nชื่อนี้จะถูกใช้สำหรับชื่อไฟล์ข้อมูล SQLite", "config-sqlite-parent-unwritable-group": "ไม่สามารถสร้างไดเรกทอรีข้อมูล $1 ได้ เนื่องจากไดเรกทอรีหลัก $2 ไม่สามารถเขียนได้โดยเว็บเซิร์ฟเวอร์\n\nโปรแกรมติดตั้งได้ทำการตรวจสอบแล้วว่าเว็บเซิร์ฟเวอร์ของคุณกำลังทำงานในฐานะผู้ใช้ใด\nทำให้ไดเรกทอรี $3 สามารถเขียนโดยผู้ใช้ดังกล่าวได้เพื่อดำเนินการต่อ\nถ้าคุณใช้ระบบ Unix/Linux ให้่ทำเช่นนี้:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "ไม่สามารถสร้างไดเรกทอรีข้อมูล $1 ได้ เนื่องจากไดเรกทอรีหลัก $2 ไม่สามารถเขียนได้โดยเว็บเซิร์ฟเวอร์\n\nโปรแกรมติดตั้งไม่สามารถทำการตรวจสอบได้ว่าเว็บเซิร์ฟเวอร์ของคุณกำลังทำงานในฐานะผู้ใช้ใด\nทำให้ไดเรกทอรี $3 สามารถเขียนโดยส่วนกลาง (ุผู้ใช้ดังกล่าว รวมถึงคนอื่นๆ ด้วย!) ได้เพื่อดำเนินการต่อ\nถ้าคุณใช้ระบบ Unix/Linux ให้่ทำเช่นนี้:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -160,11 +144,6 @@ "config-mysql-engine": "กลไกที่จัดเก็บข้อมูล:", "config-mysql-innodb": "InnoDB", "config-mysql-engine-help": "InnoDB เป็นตัวเลือกที่เกือบดีที่สุดเสมอ เนื่องจากมีการสนับสนุนกระบวนการทำงานพร้อมกัน\n\nMyISAM อาจทำงานได้เร็วกว่าในการติดตั้งแบบผู้ใช้คนเดียวหรือแบบอ่านอย่างเดียว\nฐานข้อมูล MyISAM มักจะได้รับความเสียหายบ่อยมากกว่าฐานข้อมูล InnoDB", - "config-mssql-auth": "ชนิดการยืนยันตัวตน:", - "config-mssql-install-auth": "เลือกชนิดการยืนยันตัวตนที่จะใช้เชื่อมต่อไปยังฐานข้อมูลในระหว่างกระบวนการติดตั้ง\nถ้าคุณเลือก \"{{int:config-mssql-windowsauth}}\" ข้อมูลประจำตัวที่ระบุว่าเว็บเซิร์ฟเวอร์กำลังทำงานในฐานะผู้ใช้ใดจะถูกใช้", - "config-mssql-web-auth": "เลือกชนิดการยืนยันตัวตนที่จะใช้เชื่อมต่อไปยังฐานข้อมูลในระหว่างการใช้งานวิกิตามปกติ\nถ้าคุณเลือก \"{{int:config-mssql-windowsauth}}\" ข้อมูลประจำตัวที่ระบุว่าเว็บเซิร์ฟเวอร์กำลังทำงานในฐานะผู้ใช้ใดจะถูกใช้", - "config-mssql-sqlauth": "การยืนยันตัวตนโดย SQL Server", - "config-mssql-windowsauth": "การยืนยันตัวตนโดย Windows", "config-site-name": "ชื่อของวิกิ:", "config-site-name-help": "ชื่อนี้จะปรากฏในแถบชื่อเรื่องของเบราว์เซอร์และในที่อื่นๆ อีกหลายแห่ง", "config-site-name-blank": "ป้อนชื่อไซต์", diff --git a/includes/installer/i18n/tl.json b/includes/installer/i18n/tl.json index 6d63409992..1c095f7a17 100644 --- a/includes/installer/i18n/tl.json +++ b/includes/installer/i18n/tl.json @@ -81,13 +81,9 @@ "config-db-type": "Uri ng kalipunan ng datos:", "config-db-host": "Tagapagpasinaya ng kalipunan ng datos:", "config-db-host-help": "Kung ang iyong tagapaghain ng kalipunan ng dato ay nasa ibabaw ng isang ibang tagapaghain, ipasok ang pangalan ng tagapagpasinaya o tirahan ng IP dito.\n\nKung gumagamit ka ng pinagsasaluhang pagpapasinaya ng sangkasaputan, dapat ibigay sa iyo ng iyong tagapagbigay ng pagpapasinaya ang tamang pangalan ng tagapagpasinaya sa loob ng kanilang kasulatan.\n\nKapag nagluluklok ka sa ibabaw ng isang tagapaghain ng Windows at gumagamit ng MySQL, maaaring hindi gumana ang paggamit ng \"localhost\" para sa pangalan ng tagapaghain. Kung hindi, subukan ang \"127.0.0.1\" para sa katutubong tirahan ng IP.\n\nKapag gumagamit ka ng PostgreSQL, iwanang walang laman ang hanay na ito upang kumabit sa pamamagitan ng bokilya ng Unix.", - "config-db-host-oracle": "TNS ng kalipunan ng dato:", - "config-db-host-oracle-help": "Magpasok ng isang katanggap-tanggap na [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Katutubong Pangalan ng Pagkabit]; dapat na nakikita ang isang talaksan ng tnsnames.ora sa pagluluklok na ito.
Kung gumagamit ka ng mga aklatan ng kliyente na 10g o mas bago, maaari mo ring gamitin ang pamamaraan ng pagpapangalan ng [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Maginhawang Pagkabit].", "config-db-wiki-settings": "Kilalanin ang wiking ito", "config-db-name": "Pangalan ng kalipunan ng dato:", "config-db-name-help": "Pumili ng isang pangalan na pangkilala sa wiki mo.\nHindi ito dapat maglaman ng mga patlang.\n\nKung gumagamit ka ng pinagsasaluhang pagpapasinaya ng sangkasaputan, ang iyong tagapagbigay ng pagpapasinaya ay maaaring bigyan ka ng isang tiyak na pangalan ng kalipunan ng datong gagamitin o papayagan kang lumikha ng mga kalipunan ng dato sa pamamagitan ng isang entrepanyong pantaban.", - "config-db-name-oracle": "Balangkas ng kalipunan ng dato:", - "config-db-account-oracle-warn": "Mayroong tatlong suportadong senaryo para sa pag-install ng Oracle bilang database backend:\n\nKung nais mong lumikha ng account ng database bilang bahagi ng proseso ng pag-install, paki magbigay ng isang account na mayroong gampanin ng SYSDBA bilang account ng database para sa pag-install at tukuyin ang ninanais na mga kredensiyal para sa account ng web-access, o di kaya ay maaaring gawing manu-mano ang paglikha ng account ng web access at ibigay lamang ang account na iyan (kung mayroong ito ng kinakailangang mga pahintulot upang malikha ang mga schema object) o magbigay ng dalawang magkaibang mga account, isang mayroong pribilehiyo ng paglikha at isang may pagbabawal para sa web access.\n\nAng script sa paglikha ng isang account na mayroon ng kinakailangang mga pribilehiyo ay matatagpuan sa loob ng directory na \"maintenance/oracle/\" ng pag-install na ito. Pakatandaan na ang paggamit ng isang account na may pagbabawal ay hindi magpapagana sa lahat ng mga kakayahang pampananatili kasama ang nakatakdang account.", "config-db-install-account": "Account ng tagagamit para sa pagluluklok", "config-db-username": "Pangalang pangtagagamit ng kalipunan ng dato:", "config-db-password": "Password sa kalipunan ng dato:", @@ -106,32 +102,23 @@ "config-pg-test-error": "Hindi makakabit sa kalipunan ng dato na '''$1''': $2", "config-sqlite-dir": "Direktoryo ng dato ng SQLite:", "config-sqlite-dir-help": "Iniimbak ng SQLite ang lahat ng dato sa loob ng isang nag-iisang file.\n\nAng ibibigay mong directory ay dapat na maging masusulatan ng tagapaghain ng kasaputan habang nag-i-install.\n\n'''Hindi''' ito dapat na mapuntahan sa pamamagitan ng web server, ito ang dahilan kung bakit hindi namin ito inilalagay sa kung nasaan ang iyong mga file ng PHP.\n\nAng installer ay magsusulat ng isang file na .htaccess na kasama ito, subalit kapag nabigo iyon mayroong isang tao na maaaring makakuha ng pagka nakakapunta sa iyong hilaw na database.\nKasama riyan ang hilaw na dato ng tagagamit (mga email address, pinaghalong mga password) pati na ang nabura nang mga pagbabago at iba pang may pagbabawal na dato ng wiki.\n\nIsaalang-alang ang paglalagay na magkakasama ang database sa ibang lugar, halimbawa na ang sa loob ng /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Likas na nakatakdang puwang ng talahanayan:", - "config-oracle-temp-ts": "Pansamantalang puwang ng talahanayan:", "config-type-mysql": "MariaDB, MySQL, o katugma", "config-type-postgres": "PostgreSQL", "config-type-sqlite": "SQLite", - "config-type-oracle": "Oracle", "config-support-info": "Sinusuportahan ng MediaWiki ang sumusunod na mga sistema ng kalipunan ng dato:\n\n$1\n\nKung hindi mo makita ang sistema ng kalipunan ng dato na sinusubukan mong gamitin na nakatala sa ibaba, kung gayon ay sundi ang mga tagubilin na nakakawing sa itaas upang mapagana ang suporta,", "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] ang pangunahing puntirya para sa MediaWiki at ang pinaka sinusuportahan. Gumagana rin ang MediaWiki [{{int:version-db-mariadb-url}} MariaDB] at sa [{{int:version-db-percona-url}} Percona Server], na tugma sa MySQL. ([https://www.php.net/manual/en/mysql.installation.php Paano magtipon ng PHP na mayroong suporta ng MySQL])", "config-dbsupport-postgres": "* Ang [{{int:version-db-postgres-url}} PostgreSQL] ay isang bantog na sistema ng kalipunan ng dato na bukas ang pinagmulan na panghalili sa MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Paano magtipon ng PHP na mayroong suporta ng PostgreSQL]).", "config-dbsupport-sqlite": "* Ang [{{int:version-db-sqlite-url}} SQLite] ay isang magaan ang timbang na sistema ng kalipunan ng dato na sinusuportahan nang napaka mainam. ([http://www.php.net/manual/en/pdo.installation.php Paano magtipon ng PHP na mayroong suporta ng SQLite], gumagamit ng PDO)", - "config-dbsupport-oracle": "* Ang [{{int:version-db-oracle-url}} Oracle] ay isang kalipunan ng dato ng kasigasigang pangkalakal. ([http://www.php.net/manual/en/oci8.installation.php Paano magtipunan ng PHP na mayroong suporta ng OCI8])", "config-header-mysql": "Mga katakdaan ng MariaDB/MySQL", "config-header-postgres": "Mga katakdaan ng PostgreSQL", "config-header-sqlite": "Mga katakdaan ng SQLite", - "config-header-oracle": "Mga katakdaan ng Oracle", "config-invalid-db-type": "Hindi tanggap na uri ng kalipunan ng dato", "config-missing-db-name": "Dapat kang magpasok ng isang halaga para sa \"{{int:config-db-name}}\".", "config-missing-db-host": "Dapat kang magpasok ng isang halaga para sa \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "Dapat kang magpasok ng isang halaga para sa \"{{int:config-db-host-oracle}}\".", - "config-invalid-db-server-oracle": "Hindi katanggap-tanggap na pangalan ng TNSng kalipunan ng dato na \"$1\".\nGumamit ng kahit na \"TNS Name\" o \"Easy Connect\" na tali ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Paraan ng Pagpapangalan ng Oracle]).", "config-invalid-db-name": "Hindi tanggap na pangalan ng kalipunan ng dato na \"$1\".\nGumamit lamang ng mga titik ng ASCII (a-z, A-Z), mga bilang (0-9), mga salungguhit (_) at mga gitling (-).", "config-invalid-db-prefix": "Hindi tanggap na unlapi ng kalipunan ng dato na \"$1\".\nGamitin lamang ang mga titik na ASCII (a-z, A-Z), mga bilang (0-9), mga salungguhit (_) at mga gitling (-).", "config-connection-error": "$1.\n\nSuriin ang host, pangalan at password na nasa ibaba at subukan ulit.", "config-invalid-schema": "Hindi katanggap-tanggap na panukala para sa \"$1\" ng MediaWiki.\nGumamit lamang ng mga titik ng ASCII (a-z, A-Z), mga bilang (0-9), at mga salungguhit (_).", - "config-db-sys-create-oracle": "Ang installer ay sumusuporta lamang sa paggamit ng isang account ng SYSDBA para sa paglikha ng isang bagong account.", - "config-db-sys-user-exists-oracle": "Umiiral na ang account ng tagagamit na \"$1\". Magagamit lamang ang SYSDBA para sa paglikha ng isang bagong account!", "config-postgres-old": "Kailangan ang PostgreSQL $1 o mas bago, mayroon kang $2.", "config-sqlite-name-help": "Pumili ng isang pangalan na pangkilala na wiki mo.\nHuwag gumamit ng mga puwang o mga gitling.\nGagamitin ito para sa pangalan ng talaksan ng dato ng SQLite.", "config-sqlite-parent-unwritable-group": "Hindi malikha ang direktoryo ng dato na $1, sapagkat ang magulang na direktoryong $2 ay hindi masulatan ng tagapaghain ng kasaputan.\n\nNapag-alaman ng tagapagluklok kung sinong tagagamit ang kinatatakbuhan ng iyong tagapaghain ng kasaputan.\nGawing nasusulatan nito ang $3 ng direktoryo upang makapagpatuloy.\nIto ang gawin sa ibabaw ng isang sistema ng Unix/Linux:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", diff --git a/includes/installer/i18n/tr.json b/includes/installer/i18n/tr.json index e2a46836f8..04078d618d 100644 --- a/includes/installer/i18n/tr.json +++ b/includes/installer/i18n/tr.json @@ -97,11 +97,9 @@ "config-db-type": "Veritabanı tipi:", "config-db-host": "Veritabanı sunucusu:", "config-db-host-help": "Veritabanı sunucunuz farklı bir sunucu üzerinde ise, ana bilgisayar adını veya IP adresini buraya girin.\n\nPaylaşılan ağ barındırma hizmeti kullanıyorsanız, barındırma sağlayıcınız size doğru bir ana bilgisayar adını kendi belgelerinde vermiştir.\n\nEğer MySQL kullanan bir Windows sunucusuna yükleme yapıyorsanız, sunucu adı olarak \"localhost\" kullanırsanız çalışmayabilir. Çalışmazsa, yerel IP adresi için \"127.0.0.1\" deneyin.\n\nPostgreSQL kullanıyorsanız, bu alanı bir Unix soketi ile bağlanmak için boş bırakın.", - "config-db-host-oracle": "Veritabanı TNS:", "config-db-wiki-settings": "Bu wikiyi tanımla", "config-db-name": "Veritabanı adı (tiresiz):", "config-db-name-help": "Vikinizi tanımlayan bir isim seçin.\nBoşluk karakteri içermemelidir.\n\nPaylaşılan bir web hosting servisi kullanıyorsanız, tedarikçiniz size ya kullanmanız için bir veritabanı ismi verecek ya da bir kontrol paneli vasıtasıyla sizin oluşturmanıza izin verecektir.", - "config-db-name-oracle": "Veritabanı şeması:", "config-db-install-account": "Yükleme için kullanıcı hesabı", "config-db-username": "Veritabanı kullanıcı adı:", "config-db-password": "Veritabanı parolası:", @@ -117,26 +115,17 @@ "config-db-schema-help": "Bu şema yeterli olacaktır.\nEğer gerçekten ihtiyaç duyarsanız değiştirin.", "config-pg-test-error": "Veritabanıyla bağlantı kurulamıyor ''' $1 ''':$2", "config-sqlite-dir": "SQLite veri dizini", - "config-oracle-def-ts": "Varsayılan tablo alanı:", - "config-oracle-temp-ts": "Geçici tablo alanı:", "config-type-mysql": "MySQL (veya uyumlu)", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "MySQL ayarları", "config-header-postgres": "PostgreSQL ayarları", "config-header-sqlite": "SQLite ayarları", - "config-header-oracle": "Oracle ayarları", - "config-header-mssql": "Microsoft SQL Server ayarları", "config-invalid-db-type": "Geçersiz veritabanı türü", "config-missing-db-name": "\"Veritabanı adı\" için bir değer girmelisiniz", "config-missing-db-host": "\"{{int:config-db-host}}\" için bir değer girmelisiniz.", - "config-missing-db-server-oracle": "\"{{int:config-db-host-oracle}}\" için bir değer girmelisiniz", "config-invalid-db-name": "Geçersiz veritabanı adı \" $1 \".\nSadece ASCII harf (a-z, A-Z), rakamların (0-9), alt çizgi (_) ve tire (-) kullanın.", "config-connection-error": "$1.\n\nSunucuyu kontrol edin, kullanıcı adı ve parolayı denetleyin ve yeniden deneyin.", "config-invalid-schema": "Geçersiz şema MediaWiki için \" $1 \".\nYalnızca ASCII harf (a-z, A-Z), rakamların (0-9) ve alt çizgi (_) kullanın.", - "config-db-sys-create-oracle": "Kurulum yeni hesap oluştururken sadece SYSDBA hesabı kullanımını destekliyor.", - "config-db-sys-user-exists-oracle": "Kullanıcı hesabı \" $1 \" zaten var. SYSDBA sadece yeni bir hesap oluşturmak için kullanılabilir.", "config-postgres-old": "PostgreSQL $1 veya daha yenisi gerekir. Sende $2 sürümü var.", - "config-mssql-old": "Microsoft SQL Server $1 veya daha yükseği gerekli. Sizdeki sürüm: $2.", "config-sqlite-name-help": "Wiki'nizi tanımlayan bir ad seçin.\nBoşluk ya da tire kullanmayın.\nBu isim SQLite veri dosyası için kullanılacaktır.", "config-sqlite-mkdir-error": "Veri dizini oluşturulurken bir hata oluştu \" $1 \".\nKonumu denetleyin ve yeniden deneyin.", "config-sqlite-dir-unwritable": "Bu dizine yazılamadı: \"$1\"\nİzinleri değiştirerek tekrar deneyiniz.", @@ -155,10 +144,6 @@ "config-db-web-no-create-privs": "Kurulum için belirlediğiniz hesap, hesap yaratımı için gerekli izinlere sahip değil.\nBurada belirttiğiniz hesap halihazırda var olmalı.", "config-mysql-engine": "Depolama motoru:", "config-mysql-innodb": "InnoDB (önerilen)", - "config-mssql-auth": "Kimlik doğrulama türü:", - "config-mssql-install-auth": "Kurulum işlemi sırasında veritabanına bağlanmak için kullanılacak doğrulama türünü seçin.\n\"{{int:config-mssql-windowsauth}}\"'ı seçerseniz,ağ sunucusu olarak çalışan kullanıcının kimlik bilgileri kullanılacaktır.", - "config-mssql-sqlauth": "SQL Server kimlik doğrulaması", - "config-mssql-windowsauth": "Windows Kimlik Doğrulama", "config-site-name": "Wiki adı:", "config-site-name-help": "Bu tarayıcının başlık çubuğunda ve diğer yerlerde görünecek.", "config-site-name-blank": "Bir site adı girin.", diff --git a/includes/installer/i18n/tt-cyrl.json b/includes/installer/i18n/tt-cyrl.json index d9c615d9e0..5d976e461b 100644 --- a/includes/installer/i18n/tt-cyrl.json +++ b/includes/installer/i18n/tt-cyrl.json @@ -49,30 +49,22 @@ "config-using-uri": "«$1$2» URL исемле сервер файдаланыла.", "config-db-type": "Мәгълүматлар базасы төре:", "config-db-host": "Мәгълүматлар базасы хосты:", - "config-db-host-oracle": "TNS мәгълүмат базасы:", "config-db-wiki-settings": "Бу вики тәңгәлләштерү", "config-db-name": "Мәгълүматлар базасы исеме (сызыкчасыз):", - "config-db-name-oracle": "Мәгълүматлар базасы төзелеше:", "config-db-username": "Мәгълүмат базасын кулланучы исеме:", "config-db-password": "Мәгълүмат базасының серсүзе:", "config-db-port": "Мәгълүматлар базасы порты:", "config-db-schema": "MediaWiki өчен (сызыкчасыз) төзелеш:", "config-type-mysql": "MariaDB, MySQL яки ярашлы", - "config-type-mssql": "Microsoft SQL Server", "config-header-mysql": "MariaDB/MySQL көйләнмәләре", "config-header-postgres": "PostgreSQL көйләнмәләре", "config-header-sqlite": "SQLite көйләнмәләре", - "config-header-oracle": "Oracle көйләнмәләре", - "config-header-mssql": "Microsoft SQL Server көйләнмәләре", "config-invalid-db-type": "Мәгълүматлар базасы ялгыш төре.", "config-upgrade-done-no-regenerate": "Яңартү тәмамланды.\n\nХәзер сез [$1 вики] белән эшли аласыз.", "config-regenerate": "LocalSettings.php яңадан төзү →", "config-show-table-status": "«SHOW TABLE STATUS» таләбе эшләнмәде!", "config-mysql-engine": "Саклау системасы:", "config-mysql-innodb": "InnoDB (киңәш ителә)", - "config-mssql-auth": "Аутентификация төре:", - "config-mssql-sqlauth": "SQL Server чынлыгын раслау", - "config-mssql-windowsauth": "Windows чынлыгын раслау", "config-site-name": "Вики исеме:", "config-site-name-blank": "Сайт исемен языгыз.", "config-project-namespace": "Проектның исемнәр киңлеге:", diff --git a/includes/installer/i18n/uk.json b/includes/installer/i18n/uk.json index 3ae74e747b..938f1993bb 100644 --- a/includes/installer/i18n/uk.json +++ b/includes/installer/i18n/uk.json @@ -98,13 +98,9 @@ "config-db-type": "Тип бази даних:", "config-db-host": "Хост бази даних:", "config-db-host-help": "Якщо сервер бази даних знаходиться на іншому сервері, введіть тут ім'я хосту і IP-адресу.\n\nЯкщо Ви використовуєте спільний веб-хостинг, Ваш хостинг-провайдер має надати Вам правильне ім'я хосту у його документації.\n\nЯкщо Ви використовуєте MySQL, можливість «localhost» може не працювати для серверного імені. Якщо не працює, використайте «127.0.0.1» як локальну IP-адресу.\n\nЯкщо Ви використовуєте PostgreSQL, залиште це поле пустим, щоб під'єднатись через сокет Unix.", - "config-db-host-oracle": "TNS бази даних:", - "config-db-host-oracle-help": "Введіть допустиме [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; файл tnsnames.ora має бути видимим для цієї інсталяції.
Якщо Ви використовуєте бібліотеки 10g чи новіші, можна також використовувати метод іменування [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Ідентифікувати цю вікі", "config-db-name": "Назва бази даних (без дефісів):", "config-db-name-help": "Виберіть назву, що ідентифікує Вашу вікі.\nВона не повинна містити пробілів.\n\nЯкщо Ви використовуєте віртуальний хостинг, Ваш хостинг-провайдер або надасть Вам конкретну назву бази даних, або дозволить створювати бази даних з допомогою панелі управління.", - "config-db-name-oracle": "Схема бази даних:", - "config-db-account-oracle-warn": "Є три підтримувані сценарії установки Oracle:\n\nЯкщо Ви хочете створити обліковий запис бази даних у процесі встановлення, будь ласка, вкажіть обліковий запис ролі SYSDBA для установки і бажані повноваження для облікового запису з веб-доступом. В протилежному випадку Ви можете або створити обліковий запис з веб-доступом вручну і вказати тільки цей обліковий запис (якщо він має необхідні дозволи на створення об'єктів-схем), або вказати два різні облікові записи, з яких в одного будуть права на створення, а в другого, обмеженого — права веб-доступу.\n\nСкрипт для створення облікового запису з необхідними повноваженнями можна знайти у папці \"maintenance/oracle/\" цієї інсталяції. Майте на увазі, що використання обмеженого облікового запису вимкне можливість використання технічного обслуговування з облікового запису за замовчуванням.", "config-db-install-account": "Обліковий запис користувача для встановлення", "config-db-username": "Ім'я користувача бази даних:", "config-db-password": "Пароль бази даних:", @@ -123,34 +119,22 @@ "config-pg-test-error": "Не вдається підключитися до бази даних '''$1''': $2", "config-sqlite-dir": "Папка даних SQLite:", "config-sqlite-dir-help": "SQLite зберігає усі дані в єдиному файлі.\n\nПапка, яку Ви вказуєте, має бути доступна серверу для запису під час встановлення.\n\nВона '''не''' повинна бути доступна через інтернет, тому ми і не поміщуємо її туди, де Ваші файли PHP.\n\nІнсталятор пропише у неї файл .htaccess, але якщо це не спрацює, хтось може отримати доступ до Вашої вихідної бази даних, яка містить вихідні дані користувача (адреси електронної пошти, хеші паролів), а також видалені версії та інші обмежені дані на вікі.\n\nЗа можливості розташуйте базу даних десь окремо, наприклад в /var/lib/mediawiki/yourwiki.", - "config-oracle-def-ts": "Простір таблиць за замовчуванням:", - "config-oracle-temp-ts": "Тимчасовий простір таблиць:", "config-type-mysql": "\nMariaDB, MySQL (або сумісні)", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki підтримує такі системи баз даних:\n\n$1\n\nЯкщо Ви не бачите серед перерахованих систему баз даних, яку використовуєте, виконайте вказівки, вказані вище, щоб увімкнути підтримку.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] є основною ціллю для MediaWiki і найкраще підтримується. MediaWiki також працює з [{{int:version-db-mysql-url}} MySQL] та [{{int:version-db-percona-url}} Percona Server], які сумісні з MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Як зібрати PHP з підтримкою MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] — популярна відкрита СУБД, альтернатива MySQL. ([https://www.php.net/manual/en/pgsql.installation.php як зібрати PHP з допомогою PostgreSQL]).", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] — легка система баз даних, яка дуже добре підтримується. ([http://www.php.net/manual/en/pdo.installation.php Як зібрати PHP з допомогою SQLite], використовує PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] — комерційна база даних масштабу підприємства. ([http://www.php.net/manual/en/oci8.installation.php Як зібрати PHP з підтримкою OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] — це комерційна база даних для Windows масштабу підприємства. ([https://www.php.net/manual/en/sqlsrv.installation.php Як зібрати PHP з підтримкою SQLSRV])", "config-header-mysql": "Налаштування MariaDB/MySQL", "config-header-postgres": "Налаштування PostgreSQL", "config-header-sqlite": "Налаштування SQLite", - "config-header-oracle": "Налаштування Oracle", - "config-header-mssql": "Параметри Microsoft SQL Server", "config-invalid-db-type": "Невірний тип бази даних", "config-missing-db-name": "Ви повинні ввести значення параметра «{{int:config-db-name}}».", "config-missing-db-host": "Ви повинні ввести значення параметра «{{int:config-db-host}}».", - "config-missing-db-server-oracle": "Ви повинні ввести значення параметра «{{int:config-db-host-oracle}}».", - "config-invalid-db-server-oracle": "Неприпустиме TNS бази даних \"$1\".\nВикористовуйте \"TNS Name\" або рядок \"Easy Connect\" ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Методи найменування Oracle])", "config-invalid-db-name": "Неприпустима назва бази даних \"$1\".\nВикористовуйте тільки ASCII букви (a-z, A-Z), цифри (0-9), знаки підкреслення (_) і дефіси (-).", "config-invalid-db-prefix": "Неприпустимий префікс бази даних \"$1\".\nВикористовуйте тільки ASCII букви (a-z, A-Z), цифри (0-9), знаки підкреслення (_) і дефіси (-).", "config-connection-error": "$1.\n\nПеревірте нижченаведений хост, ім'я користувача та пароль і спробуйте ще раз. Якщо Ви використовуєте «localhost» як хост бази даних, замініть його на «127.0.0.1» (або навпаки)", "config-invalid-schema": "Неприпустима схема для MediaWiki \"$1\".\nВикористовуйте тільки ASCII букви (a-z, A-Z), цифри (0-9) і знаки підкреслення(_).", - "config-db-sys-create-oracle": "Інсталятор підтримує лише використання облікового запису SYSDBA для створення нового облікового запису.", - "config-db-sys-user-exists-oracle": "Обліковий запис користувача \"$1\" уже існує. SYSDBA використовується лише для створення новий облікових записів!", "config-postgres-old": "Необхідна PostgreSQL $1 або пізніша, а у Вас $2.", - "config-mssql-old": "Вимагається Microsoft SQL Server версії $1 або більш пізнішої. У вас установлена версія $2.", "config-sqlite-name-help": "Виберіть назву, що ідентифікує Вашу вікі.\nНе використовуйте пробіли і дефіси.\nЦе буде використовуватись у назві файлу даних SQLite.", "config-sqlite-parent-unwritable-group": "Не можна створити папку даних $1, оскільки батьківська папка $2 не доступна веб-серверу для запису.\n\nІнсталятор виявив, під яким користувачем працює Ваш сервер.\nЗробіть папку $3 доступною для запису, щоб продовжити.\nВ ОС Unix/Linux виконайте:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Не можна створити папку даних $1, оскільки батьківська папка $2 не доступна веб-серверу для запису.\n\nІнсталятор не зміг виявити, під яким користувачем працює Ваш сервер.\nЗробіть папку $3 доступною для запису серверу (і всім!) глобально, щоб продовжити.\nВ ОС Unix/Linux виконайте:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -175,11 +159,6 @@ "config-mysql-engine": "Двигун бази даних:", "config-mysql-innodb": "InnoDB (рекомендовано)", "config-mysql-engine-help": "'''InnoDB''' є завжди кращим вибором, оскільки краще підтримує паралельний доступ.\n\n'''MyISAM''' може бути швидшим для одного користувача або в інсталяціях read-only.\nБази даних MyISAM схильні псуватись частіше, ніж бази InnoDB.", - "config-mssql-auth": "Тип автентифікації:", - "config-mssql-install-auth": "Виберіть тип перевірки автентичності, який буде використовуватися для підключення до бази даних під час процесу установки. \nЯкщо ви оберете \"{{int:config-mssql-windowsauth}}\", будуть використовуватися облікові дані користувача, під яким працює веб-сервер.", - "config-mssql-web-auth": "Виберіть тип перевірки автентичності, який веб-сервер буде використовувати для підключення до сервера бази даних під час звичайного функціонування вікі. \nЯкщо ви оберете \"{{int:config-mssql-windowsauth}}\", будуть використовуватися облікові дані користувача, під яким працює веб-сервер.", - "config-mssql-sqlauth": "Автентифікація сервера SQL", - "config-mssql-windowsauth": "Перевірка Достовірності Windows", "config-site-name": "Назва вікі:", "config-site-name-help": "Це буде відображатись у заголовку вікна браузера та у деяких інших місцях.", "config-site-name-blank": "Введіть назву сайту.", diff --git a/includes/installer/i18n/vi.json b/includes/installer/i18n/vi.json index 0929c1b5b1..eb71a4837b 100644 --- a/includes/installer/i18n/vi.json +++ b/includes/installer/i18n/vi.json @@ -92,13 +92,9 @@ "config-db-type": "Kiểu cơ sở dữ liệu:", "config-db-host": "Máy chủ của cơ sở dữ liệu:", "config-db-host-help": "Nếu máy chủ cơ sở dữ liệu của bạn nằm trên máy chủ khác, hãy điền tên hoặc địa chỉ IP của máy chủ vào đây.\n\nNếu bạn đang dùng Web hosting chia sẻ, tài liệu của nhà cung cấp hosting của bạn sẽ có tên chính xác của máy chủ.\n\nNếu bạn đang sử dụng MySQL, việc dùng “localhost” có thể không hợp với tên máy chủ. Nếu bị như vậy, hãy thử “127.0.0.1” tức địa chỉ IP địa phương.\n\nNếu bạn đang dùng PostgreSQL, hãy để trống mục này để kết nối với một ổ cắm Unix.", - "config-db-host-oracle": "TNS cơ sở dữ liệu:", - "config-db-host-oracle-help": "Nhập một [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Tên Kết nối Địa phương] hợp lệ; một tập tin tnsnames.ora phải được hiển thị đối với cài đặt này.
Nếu bạn đang sử dụng các thư viện trình khách 10g trở lên, bạn cũng có thể sử dụng phương pháp đặt tên [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect].", "config-db-wiki-settings": "Dữ liệu để nhận ra wiki này", "config-db-name": "Tên cơ sở dữ liệu (không có dấu gạch ngang):", "config-db-name-help": "Chọn một tên để chỉ thị wiki của bạn.\nKhông nên đưa dấu cách vào tên này.\n\nNếu bạn đang sử dụng Web hosting chia sẻ, nhà cung cấp hosting của bạn hoặc là sẽ cung cấp cho bạn một tên cơ sở dữ liệu cụ thể để sử dụng hoặc là sẽ cho phép bạn tạo ra các cơ sở dữ liệu thông qua một bảng điều khiển.", - "config-db-name-oracle": "Giản đồ cơ sở dữ liệu:", - "config-db-account-oracle-warn": "Có ba trường hợp được hỗ trợ để cài đặt Oracle làm cơ sở dữ liệu phía sau:\n\nNếu bạn muốn tạo tài khoản cơ sở dữ liệu trong quá trình cài đặt, xin vui lòng cung cấp một tài khoản với vai trò SYSDBA là tài khoản cơ sở dữ liệu để cài đặt và xác định định danh mong muốn cho tài khoản truy cập Web, nếu không bạn có thể tạo tài khoản truy cập Web thủ công và chỉ cung cấp tài khoản đó (nếu nó có các quyền yêu cầu để tạo ra các đối tượng giản đồ) hoặc cung cấp hai tài khoản riêng, một có quyền tạo ra và một bị hạn chế có quyền truy cập Web.\n\nMột kịch bản để tạo một tài khoản với quyền yêu cầu có sẵn trong thư mục cài đặt “maintenance/oracle/”. Hãy nhớ rằng việc sử dụng một tài khoản bị hạn chế sẽ vô hiệu hóa tất cả các khả năng bảo trì với tài khoản mặc định.", "config-db-install-account": "Tài khoản người dùng để cài đặt", "config-db-username": "Tên người dùng cơ sở dữ liệu:", "config-db-password": "Mật khẩu cơ sở dữ liệu:", @@ -117,34 +113,22 @@ "config-pg-test-error": "Không thể kết nối với cơ sở dữ liệu '''$1''': $2", "config-sqlite-dir": "Thư mục dữ liệu SQLite:", "config-sqlite-dir-help": "SQLite lưu tất cả các dữ liệu trong một tập tin duy nhất.\n\nThư mục mà bạn cung cấp phải cho phép máy chủ Web ghi vào khi cài đặt.\n\nKhông nên làm cho nó truy cập được qua Web; đây là lý do chúng tôi không đặt nó vào cùng thư mục với các tập tin PHP của bạn.\n\nTrình cài đặt sẽ ghi một tập tin .htaccess đi kèm, nhưng nếu thất bại người nào đó có thể truy cập vào cơ sở dữ liệu thô của bạn.\nĐiều đó bao gồm dữ liệu người dùng thô (địa chỉ thư điện tử, mật khẩu được băm) cũng như các phiên bản bị xóa và dữ liệu bị hạn chế khác trên wiki.\n\nXem xét đặt cơ sở dữ liệu tại nơi nào khác hẳn, ví dụ trong /var/lib/mediawiki/wiki_cua_ban.", - "config-oracle-def-ts": "Không gian bảng mặc định:", - "config-oracle-temp-ts": "Không gian bảng tạm:", "config-type-mysql": "MariaDB, MySQL, hoặc tương hợp", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki hỗ trợ các hệ thống cơ sở dữ liệu sau đây:\n\n$1\n\nNếu bạn không thấy hệ thống cơ sở dữ liệu mà bạn đang muốn sử dụng được liệt kê dưới đây, thì hãy theo chỉ dẫn được liên kết ở trên để kích hoạt tính năng hỗ trợ.", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] là mục tiêu chính cho MediaWiki và được hỗ trợ tốt nhất. MediaWiki cũng làm việc với [{{int:version-db-mysql-url}} MySQL] và [{{int:version-db-percona-url}} Percona Server], là những cơ sở dữ liệu tương thích với MariaDB. ([https://www.php.net/manual/en/mysqli.installation.php Làm thế nào để biên dịch PHP với sự hỗ trợ của MySQL])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] là một hệ thống cơ sở dữ liệu mã nguồn mở phổ biến như là một thay thế cho MySQL. ([https://www.php.net/manual/en/pgsql.installation.php Làm thế nào để biên dịch PHP với sự hỗ trợ của PostgreSQL])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] là một hệ thống cơ sở dữ liệu dung lượng nhẹ được hỗ trợ rất tốt. ([https://www.php.net/manual/en/pdo.installation.php Làm thế nào để biên dịch PHP với sự hỗ trợ của SQLite], sử dụng PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] là một cơ sở dữ liệu doanh nghiệp thương mại. ([https://www.php.net/manual/en/oci8.installation.php Làm thế nào để biên dịch PHP với sự hỗ trợ của OCI8])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] là một cơ sở dữ liệu doanh nghiệp thương mại cho Windows. ([https://www.php.net/manual/en/sqlsrv.installation.php Làm thế nào để biên dịch PHP với sự hỗ trợ của SQLSRV])", "config-header-mysql": "Thiết lập MariaDB/MySQL", "config-header-postgres": "Thiết lập PostgreSQL", "config-header-sqlite": "Thiết lập SQLite", - "config-header-oracle": "Thiết lập Oracle", - "config-header-mssql": "Thiết lập Microsoft SQL Server", "config-invalid-db-type": "Loại cơ sở dữ liệu không hợp lệ", "config-missing-db-name": "Bạn phải nhập một giá trị cho “{{int:config-db-name}}”", "config-missing-db-host": "Bạn phải nhập một giá trị cho “{{int:config-db-host}}”", - "config-missing-db-server-oracle": "Bạn phải nhập một giá trị cho “{{int:config-db-host-oracle}}”", - "config-invalid-db-server-oracle": "Cơ sở dữ liệu TNS không hợp lệ “$1”.\nHoặc sử dụng “TNS Name” hoặc một chuỗi “Easy Connect” ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Phương pháp đặt tên Oracle]).", "config-invalid-db-name": "Tên cơ sở dữ liệu không hợp lệ “$1”.\nChỉ sử dụng các chữ cái ASCII (a–z, A–Z), số (0–9), dấu gạch dưới (_) và dấu gạch ngang (-).", "config-invalid-db-prefix": "Tiền tố cơ sở dữ liệu không hợp lệ “$1”.\nChỉ sử dụng các chữ cái ASCII (a–z, A–Z), số (0–9), dấu gạch dưới (_) và dấu gạch ngang (-).", "config-connection-error": "$1.\n\nKiểm tra máy chủ, tên người dùng, và mật khẩu và thử lại lần nữa. Nếu sử dụng “localhost” làm máy chủ cơ sở dữ liệu, hãy thử sử dụng “127.0.0.1” thay thế (hoặc ngược lại).", "config-invalid-schema": "Giản đồ “$1” không hợp lệ cho MediaWiki.\nHãy chỉ sử dụng các chữ cái ASCII (a–z, A–Z), chữ số (0–9), và dấu gạch dưới (_).", - "config-db-sys-create-oracle": "Trình cài đặt chỉ hỗ trợ sử dụng một tài khoản SYSDBA để tạo một tài khoản mới.", - "config-db-sys-user-exists-oracle": "Tài khoản người dùng “$1” đã tồn tại. SYSDBA chỉ có thể được sử dụng để tạo một tài khoản mới!", "config-postgres-old": "Cần PostgreSQL $1 trở lên; bạn có $2.", - "config-mssql-old": "Cần Microsoft SQL Server $1 trở lên. Bạn có $2.", "config-sqlite-name-help": "Chọn một tên để chỉ thị wiki của bạn.\nKhông sử dụng các dấu cách ( ) hoặc dấu gạch nối (-).\nTên này sẽ được sử dụng cho tên tập tin dữ liệu SQLite.", "config-sqlite-parent-unwritable-group": "Không thể tạo ra thư mục dữ liệu $1, bởi vì thư mục cha $2 không cho phép máy chủ Web ghi vào.\n\nTrình cài đặt đã xác định người dùng mà máy chủ Web của bạn đang chạy.\n\nHãy thiết lập để thư mục $3 có thể ghi được bởi nó để tiếp tục.\nTrong một hệ thống Unix/Linux làm theo như sau:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "Không thể tạo ra thư mục dữ liệu $1, bởi vì thư mục cha $2 không cho phép máy chủ Web ghi vào.\n\nTrình cài đặt không thể xác định người sử dụng mà máy chủ web của bạn đang chạy.\nThiết lập thư mục $3 có thể ghi toàn cục bởi nó (và những người khác!) để tiếp tục.\nTrong một hệ thống Unix/Linux hãy đánh các dòng lệnh sau:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -169,11 +153,6 @@ "config-mysql-engine": "Máy lưu trữ:", "config-mysql-innodb": "InnoDB (khuyến khích)", "config-mysql-engine-help": "InnoDB hầu như luôn là tùy chọn tốt nhất, vì nó có hỗ trợ đồng thời rất tốt.\n\nMyISAM có thể nhanh hơn trong chế độ một người dùng hoặc các cài đặt chỉ-đọc (read-only).\nCơ sở dữ liệu MyISAM có xu hướng thường xuyên bị hỏng hóc hơn so với cơ sở dữ liệu InnoDB.", - "config-mssql-auth": "Kiểu xác thực:", - "config-mssql-install-auth": "Chọn loại xác thực sẽ được sử dụng để kết nối với cơ sở dữ liệu trong quá trình cài đặt.\nNếu bạn chọn “{{int:config-mssql-windowsauth}}”, thông tin của bất cứ người sử dụng nào mà máy chủ web đang chạy sẽ được sử dụng.", - "config-mssql-web-auth": "Chọn kiểu xác thực mà máy chủ web sẽ sử dụng để kết nối đến máy chủ cơ sở dữ liệu, trong quá trình hoạt động bình thường của wiki.\nNếu bạn chọn “{{int:config-mssql-windowsauth}}”, thông tin của bất cứ người sử dụng nào mà máy chủ web đang hoạt động sẽ được sử dụng.", - "config-mssql-sqlauth": "Xác thực SQL Server", - "config-mssql-windowsauth": "Xác thực Windows", "config-site-name": "Tên wiki:", "config-site-name-help": "Điều này sẽ xuất hiện trên thanh tiêu đề của trình duyệt và ở những nơi khác.", "config-site-name-blank": "Nhập tên của trang Web.", diff --git a/includes/installer/i18n/war.json b/includes/installer/i18n/war.json index f53d856f22..a4b5bf356e 100644 --- a/includes/installer/i18n/war.json +++ b/includes/installer/i18n/war.json @@ -50,12 +50,10 @@ "config-pcre-old": "Nangangarat-an: Nagkikinahanglan hin PCRE $1 o mas urhi pa.\nAn imo PHP nga binaryo in nakasumpay hin PCRE $2. [https://www.mediawiki.org/wiki/Manual:Errors_and_symptoms/PCRE More information].", "config-db-name": "Ngaran han database:", "config-db-name-help": "Pagpili hin ngaran nga natudlok ha imo wiki.\nDapat waray ini mga espasyo.\n\nKun ikaw in nagamit hin shared web hosting, an imo hosting provider in mahatag diri ngani an specific database name para paggamit, matugot ha imo paghimo hin mga database pinaagi han control panel.", - "config-db-name-oracle": "Schema han database:", "config-db-username": "Agnay-gumaramit para ha database:", "config-db-password": "Password para ha database:", "config-db-port": "Database port:", "config-type-mysql": "MySQL (o compatible)", - "config-type-mssql": "Microsoft SQL Server", "config-sqlite-readonly": "An file nga $1 in diri writeable.", "config-sqlite-cant-create-db": "Diri nakakahimo hin database file nga $1.", "config-db-web-account": "Database account para han web access", diff --git a/includes/installer/i18n/yi.json b/includes/installer/i18n/yi.json index 8877f2d98f..58c31a0f9b 100644 --- a/includes/installer/i18n/yi.json +++ b/includes/installer/i18n/yi.json @@ -46,17 +46,14 @@ "config-using-uri": "באניצן סארווער־אדרעס \"$1$2\".", "config-db-type": "דאטנבאזע טיפ:", "config-db-host": "דאטנבאזע־סארווער:", - "config-db-host-oracle": "דאטנבאזע־TNS:", "config-db-wiki-settings": "אידענטיפיצירן די דאזיקע וויקי", "config-db-name": "דאטנבאזע נאָמען (קיין מקף):", - "config-db-name-oracle": "דאטנבאזע סכעמע:", "config-db-install-account": "באניצער־קאנטע פאר אינסטאלאציע", "config-db-username": "דאטנבאזע באניצער־נאָמען:", "config-db-password": "דאטנבאזע־פאסווארט:", "config-invalid-db-type": "אומגילטיגער דאטנבאזע־טיפ", "config-missing-db-name": "איר דארפט איינגעבן א ווערט פאר \"{{int:config-db-name}}\".", "config-missing-db-host": "איר דארפט איינגעבן א ווערט פאר \"{{int:config-db-host}}\".", - "config-missing-db-server-oracle": "איר דארפט איינגעבן א ווערט פאר \"{{int:config-db-host-oracle}}\".", "config-project-namespace": "פראיעקט נאָמענטייל:", "config-ns-generic": "פראיעקט", "config-admin-name": "אײַער באַניצער־נאָמען:", diff --git a/includes/installer/i18n/yue.json b/includes/installer/i18n/yue.json index 49d534a184..9f054dfb84 100644 --- a/includes/installer/i18n/yue.json +++ b/includes/installer/i18n/yue.json @@ -32,8 +32,8 @@ "config-env-php": "安裝咗PHP$1", "config-env-hhvm": "安裝咗HHVM$1", "config-outdated-sqlite": "警告:你安裝咗SQLite $1,但係佢嘅版本低過最低要求版本 $2。你將會用毋到SQLite。", - "config-apc": "[https://secure.php.net/apc APC]安裝咗", - "config-apcu": "[https://secure.php.net/apcu APCu]安裝咗", + "config-apc": "[https://www.php.net/apc APC]安裝咗", + "config-apcu": "[https://www.php.net/apcu APCu]安裝咗", "config-wincache": "[https://www.iis.net/downloads/microsoft/wincache-extension WinCache]安裝咗", "config-diff3-bad": "搵毋到GNU diff3。", "config-db-type": "資料庫類型:", diff --git a/includes/installer/i18n/zh-hans.json b/includes/installer/i18n/zh-hans.json index ecbfe026bd..4800cbe924 100644 --- a/includes/installer/i18n/zh-hans.json +++ b/includes/installer/i18n/zh-hans.json @@ -104,13 +104,9 @@ "config-db-type": "数据库类型:", "config-db-host": "数据库主机:", "config-db-host-help": "如果您的数据库在别的服务器上,请在这里输入其域名或IP地址。\n\n如果您在使用共享网站套餐,您的网站商应该已在他们的控制面板中给您数据库信息了。\n\n如果您使用MySQL,“localhost”可能无效。如果确实无效,请输入“127.0.0.1”作为IP地址。\n\n如果您在使用PostgreSQL,并且要用Unix socket来连接,请留空。", - "config-db-host-oracle": "数据库透明网络底层(TNS):", - "config-db-host-oracle-help": "请输入合法的[http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm 本地连接名],并确保tnsnames.ora文件对本安装程序可见。
如果您使用的客户端库为10g或更新的版本,您还可以使用[http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm 简单连接名方法](easy connect naming method)。", "config-db-wiki-settings": "标识本wiki", "config-db-name": "数据库名称(不带连字号):", "config-db-name-help": "请输入一个可以标识您的wiki的名称。请勿使用空格。\n\n如果您正在使用共享web主机,您的主机提供商或会给您指定一个数据库名称,或会让您通过控制面板创建数据库。", - "config-db-name-oracle": "数据库模式:", - "config-db-account-oracle-warn": "现有三种已支持方案可以将Oracle设置为后端数据库:\n\n如果您希望在安装过程中创建数据库帐户,请为安装程序提供具有SYSDBA角色的数据库帐户,并为web访问帐户指定所需身份证明;否则您可以手动创建web访问的账户并仅须提供该帐户(确保帐户已有创建方案对象(schema object)的所需权限);或提供两个不同的帐户,其一具有创建权限,另一则被限制为web访问。\n\n具有所需权限账户的创建脚本存放于本程序的“maintenance/oracle/”目录下。请注意,使用受限制的帐户将禁用默认帐户的所有维护性功能。", "config-db-install-account": "用于安装的用户帐号", "config-db-username": "数据库用户名:", "config-db-password": "数据库密码:", @@ -129,34 +125,22 @@ "config-pg-test-error": "无法连接到数据库$1:$2", "config-sqlite-dir": "SQLite数据目录:", "config-sqlite-dir-help": "SQLite会将所有的数据存储于单一文件中。\n\n您所提供的目录必须在安装过程中对网页服务器可写。\n\n该目录不应允许通过web访问,因此我们不会将数据文件和PHP文件放在一起。\n\n安装程序在创建数据文件时,亦会在相同目录下创建.htaccess以控制权限。假若此等控制失效,则可能会将您的数据文件暴露于公共空间,让他人可以获取用户数据(电子邮件地址、杂凑后的密码)、被删除的版本以及其他在wiki上被限制访问的数据。\n\n请考虑将数据库统一放置在某处,如/var/lib/mediawiki/yourwiki下。", - "config-oracle-def-ts": "默认表空间:", - "config-oracle-temp-ts": "临时表空间:", "config-type-mysql": "MariaDB、MySQL或兼容程序", - "config-type-mssql": "微软SQL服务器", "config-support-info": "MediaWiki支持以下数据库系统:\n\n$1\n\n如果您在下面列出的数据库系统中没有找到您希望使用的系统,请根据上方链向的指引启用支持。", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB]是用于MediaWiki的主要数据库,对它的支持最为完备。MediaWiki也可以在[{{int:version-db-mysql-url}} MySQL]和[{{int:version-db-percona-url}} Percona Server]下工作,它们与MariaDB兼容。([https://www.php.net/manual/en/mysqli.installation.php 如何将对MySQL的支持编译进PHP中])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL]是一种流行的开源数据库系统,可作为MySQL的替代。([https://www.php.net/manual/en/pgsql.installation.php 如何将对PostgreSQL的支持编译进PHP中])", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite]是一种轻量级的数据库系统,能被良好地支持。([https://www.php.net/manual/en/pdo.installation.php 如何将对SQLite的支持编译进PHP中],须使用PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle]是一种商用企业级的数据库。([https://www.php.net/manual/en/oci8.installation.php 如何将对OCI8的支持编译进PHP中])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server]是一个适用于Windows的商业性企业数据库。([https://www.php.net/manual/en/sqlsrv.installation.php 如何编译带有SQLSRV支持的PHP])", "config-header-mysql": "MariaDB/MySQL设置", "config-header-postgres": "PostgreSQL设置", "config-header-sqlite": "SQLite设置", - "config-header-oracle": "Oracle设置", - "config-header-mssql": "Microsoft SQL Server设置", "config-invalid-db-type": "无效的数据库类型", "config-missing-db-name": "您必须为“{{int:config-db-name}}”输入一个值。", "config-missing-db-host": "您必须为“{{int:config-db-host}}”输入一个值。", - "config-missing-db-server-oracle": "您必须为“{{int:config-db-host-oracle}}”输入一个值。", - "config-invalid-db-server-oracle": "无效的数据库TNS“$1”。请使用“TNS 名称”或者一个“轻松连接”字符串([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle 命名方法])", "config-invalid-db-name": "无效的数据库名称“$1”。请只使用ASCII字母(a-z、A-Z)、数字(0-9)、下划线(_)和连字号(-)。", "config-invalid-db-prefix": "无效的数据库前缀“$1”。请只使用ASCII字母(a-z、A-Z)、数字(0-9)、下划线(_)和连字号(-)。", "config-connection-error": "$1。\n\n请检查下列的主机、用户名和密码设置后重试。若使用\"localhost\"作为数据库主机,请尝试\"127.0.0.1\"(反之亦然)。", "config-invalid-schema": "无效的MediaWiki数据库模式“$1”。请只使用ASCII字母(a-z、A-Z)、数字(0-9)和下划线(_)。", - "config-db-sys-create-oracle": "安装程序仅支持使用SYSDBA帐户创建新帐户。", - "config-db-sys-user-exists-oracle": "用户帐户“$1”已经存在。SYSDBA仅可用于创建新帐户!", "config-postgres-old": "需要PostgreSQL $1或更新的版本,您的版本为$2。", - "config-mssql-old": "需要 Microsoft SQL Server $1 或者更高版本。您的版本是 $2。", "config-sqlite-name-help": "请为您的wiki指定一个用于标识的名称。请勿使用空格或连字号,该名称将被用作SQLite的数据文件名。", "config-sqlite-parent-unwritable-group": "由于父目录$2对网页服务器不可写,无法创建数据目录$1。\n\n安装程序已确定您网页服务器所使用的用户。请将$3目录设为对该用户可写以继续安装过程。在Unix/Linux系统中,您可以逐行输入下列命令:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "由于父目录$2对网页服务器不可写,无法创建数据目录$1。\n\n安装程序无法确定您网页服务器所使用的用户。请将$3目录设为全局可写(对所有用户)以继续安装过程。在Unix/Linux系统中,您可以逐行输入下列命令:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -180,11 +164,6 @@ "config-mysql-engine": "存储引擎:", "config-mysql-innodb": "InnoDB(推荐)", "config-mysql-engine-help": "InnoDB通常是最佳选项,因为它对并发操作有着良好的支持。\n\nMyISAM在单用户或只读环境下可能会有更快的性能表现。但MyISAM数据库出错的概率一般要大于InnoDB数据库。", - "config-mssql-auth": "身份验证类型:", - "config-mssql-install-auth": "选择安装过程中链接数据库时将采用的身份验证方式。如果您选择“{{int:config-mssql-windowsauth}}”,将使用运行服务器的用户的身份凭据。", - "config-mssql-web-auth": "选择Web服务器在通常wiki操作期间用来连接数据库服务器的身份验证方式。如果您选择“{{int:config-mssql-windowsauth}}”,将使用运行Web服务器的用户的凭据。", - "config-mssql-sqlauth": "SQL Server 身份验证", - "config-mssql-windowsauth": "Windows 身份验证", "config-site-name": "wiki的名称:", "config-site-name-help": "填入的内容会出现在浏览器的标题栏以及其他多处位置中。", "config-site-name-blank": "输入网站的名称。", diff --git a/includes/installer/i18n/zh-hant.json b/includes/installer/i18n/zh-hant.json index 28774f80e1..3669178a04 100644 --- a/includes/installer/i18n/zh-hant.json +++ b/includes/installer/i18n/zh-hant.json @@ -105,13 +105,9 @@ "config-db-type": "資料庫類型:", "config-db-host": "資料庫主機:", "config-db-host-help": "如果您的資料庫安裝在其他伺服器上,請在此輸入該主機的名稱或 IP 位址。\n\n如果您使用共用的網頁主機,您的主機提供商應會在說明文件上告訴您正確的主機名稱。\n\n如果您使用 MySQL,伺服器名稱可能無法使用 \"localhost\"。若確實無法使用,請改嘗試使用本機的 IP 位址 \"127.0.0.1\"。\n\n如果您使用 PostgreSQL,將此欄位空白以使用 Unix socket 來連線。", - "config-db-host-oracle": "資料庫的 TNS:", - "config-db-host-oracle-help": "請輸入有效的 [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm 本地連線名稱],並確認安裝程式可以讀取 tnsnames.ora 檔案。
如果您使用的客戶端程式庫為 10g 或者更新的版本,您也可使用 [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm 簡易連線] 的命名方法進行連線。", "config-db-wiki-settings": "識別此 wiki", "config-db-name": "資料庫名稱(不帶連字號):", "config-db-name-help": "請輸入一個可以辨識您的 Wiki 的名稱,\n請勿包含空格。\n\n如果您使用的是共用的網頁主機,您的主機提供商會給您一個指定的資料庫名稱,或者讓您透過管理介面建立資料庫。", - "config-db-name-oracle": "資料庫 Schema:", - "config-db-account-oracle-warn": "目前有三種支援 Oracle 做為後端資料庫的方案:\n\n如果您希望在安裝的過程中自動建立新的資料庫,請提供具有 SYSDBA 權限的帳號並且提供未來要給網頁存取使用的資料庫帳號及密碼。或者您可以手動建立給網頁存取使用的資料庫帳號 (請確保該帳號有建立 Schema Object 的權限),再不然您可以提供兩組不同的帳號,一組用來建立權限,而另一組用來做為網頁存取使用。\n\n本次安裝建立的帳號以及權限所需要的 Script,可以在 \"maintenance/oracle/\" 中找到。\n請注意,若您使用有限制的帳號將會預設關閉所有維護性功能。", "config-db-install-account": "安裝程式使用的使用者帳號", "config-db-username": "資料庫使用者名稱:", "config-db-password": "資料庫密碼:", @@ -130,34 +126,22 @@ "config-pg-test-error": "無法連線到資料庫 $1:$2", "config-sqlite-dir": "SQLite 的資料目錄:", "config-sqlite-dir-help": "SQLite 會將所有的資料存儲於單一檔案中。\n\n您所提供的目錄在安裝過程中必須開啟給網頁伺服器的寫入權限。\n\n該目錄 不應 可以被透過網頁所開啟,這也是為什麼我們不將資料與 PHP 檔案放在一起。\n\n安裝程式在建立資料庫檔案時,會同時在目錄下建立 .htaccess 以控制網頁伺服器權限。若此設定失效,則會導致任何人可以直接存取您的原始資料檔案,而資料庫的內容包含原始的使用者資料 (電子郵件地址、加密後的密碼)、刪除後的修訂及其他在 Wiki 上被限制存取的資料。\n\n請考慮將資料庫統一放置在某處,如 /var/lib/mediawiki/yourwiki 底下。", - "config-oracle-def-ts": "預設資料表空間:", - "config-oracle-temp-ts": "臨時資料表空間:", "config-type-mysql": "MariaDB、MySQL、或與其相容的套件", - "config-type-mssql": "Microsoft SQL Server", "config-support-info": "MediaWiki 支援以下資料庫系統:\n\n$1\n\n如果您下方沒有看到您要使用的資料庫系統,請根據上方連結指示開啟資料庫的支援。", "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] 是 MediaWiki 主要支援的資料庫系統。MediaWiki 也同時可運作與於 [{{int:version-db-mysql-url}} MySQL] 和 [{{int:version-db-percona-url}} Percona 伺服器],上述這些與 MariaDB 相容的資料庫系統。([https://www.php.net/manual/en/mysqli.installation.php 如何編譯支援 MySQL 的 PHP])", "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] 是一套受歡迎的開源資料庫系統,可用來替代 MySQL。([https://www.php.net/manual/en/pgsql.installation.php 如何編譯支援 PostgreSQL 的 PHP])。", "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] 是一套輕量級的資料庫系統,MediaWiki 可在此資料庫系統上良好的運作。([https://www.php.net/manual/en/pdo.installation.php 如何編譯支援 SQLite 的 PHP],須透過 PDO)", - "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] 是一套商用企業級的資料庫。([https://www.php.net/manual/en/oci8.installation.php 如何編譯支援 OCI8 的 PHP])", - "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] 是一套 Windows 專用的商用企業級的資料庫。 ([https://www.php.net/manual/en/sqlsrv.installation.php 如何編譯支援 SQLSRV 的 PHP])", "config-header-mysql": "MariaDB/MySQL 設定", "config-header-postgres": "PostgreSQL 設定", "config-header-sqlite": "SQLite 設定", - "config-header-oracle": "Oracle 設定", - "config-header-mssql": "Microsoft SQL Server 設定", "config-invalid-db-type": "無效的資料庫類型。", "config-missing-db-name": "您必須輸入 \"{{int:config-db-name}}\" 欄位的內容。", "config-missing-db-host": "您必須輸入 \"{{int:config-db-host}}\" 欄位的內容。", - "config-missing-db-server-oracle": "您必須輸入 \"{{int:config-db-host-oracle}}\" 欄位的內容。", - "config-invalid-db-server-oracle": "無效的資料庫 TNS \"$1\"。\n請使用符合 \"TNS 名稱\" 或 \"簡易連線\" 規則的字串([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracle命名規則])", "config-invalid-db-name": "無效的資料庫名稱 \"$1\"。\n僅允許使用 ASCII 字母(a-z、A-Z)、數字(0-9)、底線(_)與連字號(-)。", "config-invalid-db-prefix": "無效的資料庫字首 \"$1\"。\n僅允許使用 ASCII 字母(a-z、A-Z)、數字(0-9)、底線(_)與連字號(-)。", "config-connection-error": "$1。\n\n請檢查主機、使用者名稱和密碼設定,然後重試。如果是使用 \"localhost\" 來作為資料庫主機,請嘗試改用 \"127.0.0.1\"(反之亦然)。", "config-invalid-schema": "無效的資料庫 Schema \"$1\"。\n僅允許使用 ASCII 字母(a-z、A-Z)、數字(0-9)、底線(_)與連字號(-)。", - "config-db-sys-create-oracle": "安裝程式只支援使用 SYSDBA 帳號建立新帳號。", - "config-db-sys-user-exists-oracle": "使用者帳號 \"$1\" 已存在。 SYSDBA 只可用來建立新的帳號!", "config-postgres-old": "需要使用 PostgreSQL $1 或更新的版本,您的版本為 $2。", - "config-mssql-old": "需要使用 Microsoft SQL Server $1 或更新的版本,您的版本為 $2。", "config-sqlite-name-help": "請為您的 Wiki 設定一個用來辨識的名稱。\n請勿使用空格或連字號,\n該名稱會被用來做為 SQLite 資料檔的名稱。", "config-sqlite-parent-unwritable-group": "無法建立資料目錄 $1
,因網頁伺服器對該目錄所在的上層目錄 $2 沒有寫入權限。\n\n安裝程序所使用的身份依據您用來執行網頁伺服器的身份而定,\n請開啟網頁伺服器對 $3 的寫入權以繼續安裝,\n在 Unix/Linux 系統可以執行以下指令:\n\n
cd $2\nmkdir $3\nchgrp $4 $3\nchmod g+w $3
", "config-sqlite-parent-unwritable-nogroup": "無法建立資料目錄 $1
,因網頁伺服器對該目錄所在的上層目錄 $2 沒有寫入權限。\n\n安裝程序所使用的身份依據您用來執行網頁伺服器的身份而定,\n請開啟全部人對 $3 的寫入權以繼續安裝,\n在 Unix/Linux 系統可以執行以下指令:\n\n
cd $2\nmkdir $3\nchmod a+w $3
", @@ -182,11 +166,6 @@ "config-mysql-engine": "儲存引擎:", "config-mysql-innodb": "InnoDB(推薦)", "config-mysql-engine-help": "由於對同時連線有較好的處理能力,InnoDB 通常是最佳的選項。\n\nMyISAM 只在單人使用或者唯讀作業的情況之下才可能有較快的處理能力。\n相較於 InnoDB,MyISAM 也較容易出現資料損毀的情況。", - "config-mssql-auth": "身份驗證類型:", - "config-mssql-install-auth": "請選擇安裝程序中要用來連線資料庫使用的身份驗證類型。\n若您選擇 \"{{int:config-mssql-windowsauth}}\",不論網頁伺服器是使用何種身份執行都會使用這組驗證資料。", - "config-mssql-web-auth": "請選擇一般操作中要用來連線資料庫使用的身份驗證類型。\n若您選擇 \"{{int:config-mssql-windowsauth}}\",不論網頁伺服器是使用何種身份執行都會使用這組驗證資料。", - "config-mssql-sqlauth": "SQL Server 身份驗證", - "config-mssql-windowsauth": "Windows 身份驗證", "config-site-name": "wiki 的名稱:", "config-site-name-help": "您所填入的內容會出現在瀏覽器的標題列以及各種其他地方。", "config-site-name-blank": "請輸入網站名稱。", diff --git a/includes/jobqueue/jobs/ActivityUpdateJob.php b/includes/jobqueue/jobs/ActivityUpdateJob.php index 4de72a9b12..d27056dc02 100644 --- a/includes/jobqueue/jobs/ActivityUpdateJob.php +++ b/includes/jobqueue/jobs/ActivityUpdateJob.php @@ -42,7 +42,7 @@ class ActivityUpdateJob extends Job { static $required = [ 'type', 'userid', 'notifTime', 'curTime' ]; $missing = implode( ', ', array_diff( $required, array_keys( $this->params ) ) ); if ( $missing != '' ) { - throw new InvalidArgumentException( "Missing paramter(s) $missing" ); + throw new InvalidArgumentException( "Missing parameter(s) $missing" ); } $this->removeDuplicates = true; diff --git a/includes/jobqueue/jobs/RecentChangesUpdateJob.php b/includes/jobqueue/jobs/RecentChangesUpdateJob.php index 2d4ce34c83..63e6da47ca 100644 --- a/includes/jobqueue/jobs/RecentChangesUpdateJob.php +++ b/includes/jobqueue/jobs/RecentChangesUpdateJob.php @@ -168,7 +168,7 @@ class RecentChangesUpdateJob extends Job { ], __METHOD__, [ - 'GROUP BY' => [ 'rc_user_text' ], + 'GROUP BY' => [ $actorQuery['fields']['rc_user_text'] ], 'ORDER BY' => 'NULL' // avoid filesort ], $actorQuery['joins'] diff --git a/includes/language/LanguageCode.php b/includes/language/LanguageCode.php index 7d954d3803..1d2f0b4e83 100644 --- a/includes/language/LanguageCode.php +++ b/includes/language/LanguageCode.php @@ -21,7 +21,6 @@ /** * Methods for dealing with language codes. - * @todo Move some of the code-related static methods out of Language into this class * * @since 1.29 * @ingroup Language diff --git a/includes/language/LanguageNameUtils.php b/includes/language/LanguageNameUtils.php new file mode 100644 index 0000000000..08d9ab3e0d --- /dev/null +++ b/includes/language/LanguageNameUtils.php @@ -0,0 +1,319 @@ +assertRequiredOptions( self::$constructorOptions ); + $this->options = $options; + } + + /** + * Checks whether any localisation is available for that language tag in MediaWiki + * (MessagesXx.php or xx.json exists). + * + * @param string $code Language tag (in lower case) + * @return bool Whether language is supported + */ + public function isSupportedLanguage( $code ) { + if ( !$this->isValidBuiltInCode( $code ) ) { + return false; + } + + if ( $code === 'qqq' ) { + // Special code for internal use, not supported even though there is a qqq.json + return false; + } + + return is_readable( $this->getMessagesFileName( $code ) ) || + is_readable( $this->getJsonMessagesFileName( $code ) ); + } + + /** + * Returns true if a language code string is of a valid form, whether or not it exists. This + * includes codes which are used solely for customisation via the MediaWiki namespace. + * + * @param string $code + * + * @return bool + */ + public function isValidCode( $code ) { + Assert::parameterType( 'string', $code, '$code' ); + if ( !isset( $this->validCodeCache[$code] ) ) { + // People think language codes are HTML-safe, so enforce it. Ideally we should only + // allow a-zA-Z0-9- but .+ and other chars are often used for {{int:}} hacks. See bugs + // T39564, T39587, T38938. + $this->validCodeCache[$code] = + // Protect against path traversal + strcspn( $code, ":/\\\000&<>'\"" ) === strlen( $code ) && + !preg_match( MediaWikiTitleCodec::getTitleInvalidRegex(), $code ); + } + return $this->validCodeCache[$code]; + } + + /** + * Returns true if a language code is of a valid form for the purposes of internal customisation + * of MediaWiki, via Messages*.php or *.json. + * + * @param string $code + * @return bool + */ + public function isValidBuiltInCode( $code ) { + Assert::parameterType( 'string', $code, '$code' ); + + return (bool)preg_match( '/^[a-z0-9-]{2,}$/', $code ); + } + + /** + * Returns true if a language code is an IETF tag known to MediaWiki. + * + * @param string $tag + * + * @return bool + */ + public function isKnownLanguageTag( $tag ) { + // Quick escape for invalid input to avoid exceptions down the line when code tries to + // process tags which are not valid at all. + if ( !$this->isValidBuiltInCode( $tag ) ) { + return false; + } + + if ( isset( Data\Names::$names[$tag] ) || $this->getLanguageName( $tag, $tag ) !== '' ) { + return true; + } + + return false; + } + + /** + * Get an array of language names, indexed by code. + * @param null|string $inLanguage Code of language in which to return the names + * Use self::AUTONYMS for autonyms (native names) + * @param string $include One of: + * self::ALL all available languages + * self::DEFINED only if the language is defined in MediaWiki or wgExtraLanguageNames + * (default) + * self::SUPPORTED only if the language is in self::DEFINED *and* has a message file + * @return array Language code => language name (sorted by key) + */ + public function getLanguageNames( $inLanguage = self::AUTONYMS, $include = self::DEFINED ) { + $cacheKey = $inLanguage === self::AUTONYMS ? 'null' : $inLanguage; + $cacheKey .= ":$include"; + if ( !$this->languageNameCache ) { + $this->languageNameCache = new HashBagOStuff( [ 'maxKeys' => 20 ] ); + } + + $ret = $this->languageNameCache->get( $cacheKey ); + if ( !$ret ) { + $ret = $this->getLanguageNamesUncached( $inLanguage, $include ); + $this->languageNameCache->set( $cacheKey, $ret ); + } + return $ret; + } + + /** + * Uncached helper for getLanguageNames + * @param null|string $inLanguage As getLanguageNames + * @param string $include As getLanguageNames + * @return array Language code => language name (sorted by key) + */ + private function getLanguageNamesUncached( $inLanguage, $include ) { + // If passed an invalid language code to use, fallback to en + if ( $inLanguage !== self::AUTONYMS && !$this->isValidCode( $inLanguage ) ) { + $inLanguage = 'en'; + } + + $names = []; + + if ( $inLanguage !== self::AUTONYMS ) { + # TODO: also include for self::AUTONYMS, when this code is more efficient + Hooks::run( 'LanguageGetTranslatedLanguageNames', [ &$names, $inLanguage ] ); + } + + $mwNames = $this->options->get( 'ExtraLanguageNames' ) + Data\Names::$names; + if ( $this->options->get( 'UsePigLatinVariant' ) ) { + // Pig Latin (for variant development) + $mwNames['en-x-piglatin'] = 'Igpay Atinlay'; + } + + foreach ( $mwNames as $mwCode => $mwName ) { + # - Prefer own MediaWiki native name when not using the hook + # - For other names just add if not added through the hook + if ( $mwCode === $inLanguage || !isset( $names[$mwCode] ) ) { + $names[$mwCode] = $mwName; + } + } + + if ( $include === self::ALL ) { + ksort( $names ); + return $names; + } + + $returnMw = []; + $coreCodes = array_keys( $mwNames ); + foreach ( $coreCodes as $coreCode ) { + $returnMw[$coreCode] = $names[$coreCode]; + } + + if ( $include === self::SUPPORTED ) { + $namesMwFile = []; + # We do this using a foreach over the codes instead of a directory loop so that messages + # files in extensions will work correctly. + foreach ( $returnMw as $code => $value ) { + if ( is_readable( $this->getMessagesFileName( $code ) ) || + is_readable( $this->getJsonMessagesFileName( $code ) ) + ) { + $namesMwFile[$code] = $names[$code]; + } + } + + ksort( $namesMwFile ); + return $namesMwFile; + } + + ksort( $returnMw ); + # self::DEFINED option; default if it's not one of the other two options + # (self::ALL/self::SUPPORTED) + return $returnMw; + } + + /** + * @param string $code The code of the language for which to get the name + * @param null|string $inLanguage Code of language in which to return the name (self::AUTONYMS + * for autonyms) + * @param string $include See getLanguageNames(), except this defaults to self::ALL instead of + * self::DEFINED + * @return string Language name or empty + * @since 1.20 + */ + public function getLanguageName( $code, $inLanguage = self::AUTONYMS, $include = self::ALL ) { + $code = strtolower( $code ); + $array = $this->getLanguageNames( $inLanguage, $include ); + return $array[$code] ?? ''; + } + + /** + * Get the name of a file for a certain language code + * @param string $prefix Prepend this to the filename + * @param string $code Language code + * @param string $suffix Append this to the filename + * @throws MWException + * @return string $prefix . $mangledCode . $suffix + */ + public function getFileName( $prefix, $code, $suffix = '.php' ) { + if ( !$this->isValidBuiltInCode( $code ) ) { + throw new MWException( "Invalid language code \"$code\"" ); + } + + return $prefix . str_replace( '-', '_', ucfirst( $code ) ) . $suffix; + } + + /** + * @param string $code + * @return string + */ + public function getMessagesFileName( $code ) { + global $IP; + $file = $this->getFileName( "$IP/languages/messages/Messages", $code, '.php' ); + Hooks::run( 'Language::getMessagesFileName', [ $code, &$file ] ); + return $file; + } + + /** + * @param string $code + * @return string + * @throws MWException + */ + public function getJsonMessagesFileName( $code ) { + global $IP; + + if ( !$this->isValidBuiltInCode( $code ) ) { + throw new MWException( "Invalid language code \"$code\"" ); + } + + return "$IP/languages/i18n/$code.json"; + } +} diff --git a/includes/libs/filebackend/FSFileBackend.php b/includes/libs/filebackend/FSFileBackend.php index 593e617fe6..c05dc286c8 100644 --- a/includes/libs/filebackend/FSFileBackend.php +++ b/includes/libs/filebackend/FSFileBackend.php @@ -228,7 +228,7 @@ class FSFileBackend extends FileBackendStore { } if ( !empty( $params['async'] ) ) { // deferred - $tempFile = TempFSFile::factory( 'create_', 'tmp', $this->tmpDirectory ); + $tempFile = $this->tmpFileFactory->newTempFSFile( 'create_', 'tmp' ); if ( !$tempFile ) { $status->fatal( 'backend-fail-create', $params['dst'] ); @@ -688,7 +688,7 @@ class FSFileBackend extends FileBackendStore { } else { // Create a new temporary file with the same extension... $ext = FileBackend::extensionFromPath( $src ); - $tmpFile = TempFSFile::factory( 'localcopy_', $ext, $this->tmpDirectory ); + $tmpFile = $this->tmpFileFactory->newTempFSFile( 'localcopy_', $ext ); if ( !$tmpFile ) { $tmpFiles[$src] = null; } else { @@ -795,8 +795,16 @@ class FSFileBackend extends FileBackendStore { * Listen for E_WARNING errors and track whether any happen */ protected function trapWarnings() { - $this->hadWarningErrors[] = false; // push to stack - set_error_handler( [ $this, 'handleWarning' ], E_WARNING ); + // push to stack + $this->hadWarningErrors[] = false; + set_error_handler( function ( $errno, $errstr ) { + // more detailed error logging + $this->logger->error( $errstr ); + $this->hadWarningErrors[count( $this->hadWarningErrors ) - 1] = true; + + // suppress from PHP handler + return true; + }, E_WARNING ); } /** @@ -805,20 +813,9 @@ class FSFileBackend extends FileBackendStore { * @return bool */ protected function untrapWarnings() { - restore_error_handler(); // restore previous handler - return array_pop( $this->hadWarningErrors ); // pop from stack - } - - /** - * @param int $errno - * @param string $errstr - * @return bool - * @private - */ - public function handleWarning( $errno, $errstr ) { - $this->logger->error( $errstr ); // more detailed error logging - $this->hadWarningErrors[count( $this->hadWarningErrors ) - 1] = true; - - return true; // suppress from PHP handler + // restore previous handler + restore_error_handler(); + // pop from stack + return array_pop( $this->hadWarningErrors ); } } diff --git a/includes/libs/filebackend/FileBackend.php b/includes/libs/filebackend/FileBackend.php index f65619fd8c..4cacb7af63 100644 --- a/includes/libs/filebackend/FileBackend.php +++ b/includes/libs/filebackend/FileBackend.php @@ -27,6 +27,7 @@ * @file * @ingroup FileBackend */ +use MediaWiki\FileBackend\FSFile\TempFSFileFactory; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerInterface; use Wikimedia\ScopedCallback; @@ -106,8 +107,8 @@ abstract class FileBackend implements LoggerAwareInterface { /** @var int How many operations can be done in parallel */ protected $concurrency; - /** @var string Temporary file directory */ - protected $tmpDirectory; + /** @var TempFSFileFactory */ + protected $tmpFileFactory; /** @var LockManager */ protected $lockManager; @@ -152,8 +153,10 @@ abstract class FileBackend implements LoggerAwareInterface { * - parallelize : When to do file operations in parallel (when possible). * Allowed values are "implicit", "explicit" and "off". * - concurrency : How many file operations can be done in parallel. - * - tmpDirectory : Directory to use for temporary files. If this is not set or null, - * then the backend will try to discover a usable temporary directory. + * - tmpDirectory : Directory to use for temporary files. + * - tmpFileFactory : Optional TempFSFileFactory object. Only has an effect if tmpDirectory is + * not set. If both are unset or null, then the backend will try to discover a usable + * temporary directory. * - obResetFunc : alternative callback to clear the output buffer * - streamMimeFunc : alternative method to determine the content type from the path * - logger : Optional PSR logger object. @@ -193,7 +196,12 @@ abstract class FileBackend implements LoggerAwareInterface { } $this->logger = $config['logger'] ?? new NullLogger(); $this->statusWrapper = $config['statusWrapper'] ?? null; - $this->tmpDirectory = $config['tmpDirectory'] ?? null; + // tmpDirectory gets precedence for backward compatibility + if ( isset( $config['tmpDirectory'] ) ) { + $this->tmpFileFactory = new TempFSFileFactory( $config['tmpDirectory'] ); + } else { + $this->tmpFileFactory = $config['tmpFileFactory'] ?? new TempFSFileFactory(); + } } public function setLogger( LoggerInterface $logger ) { @@ -412,7 +420,7 @@ abstract class FileBackend implements LoggerAwareInterface { * * The StatusValue will be "OK" unless: * - a) unexpected operation errors occurred (network partitions, disk full...) - * - b) significant operation errors occurred and 'force' was not set + * - b) predicted operation errors occurred and 'force' was not set * * @param array $ops List of operations to execute in order * @param array $opts Batch operation options diff --git a/includes/libs/filebackend/FileBackendMultiWrite.php b/includes/libs/filebackend/FileBackendMultiWrite.php index f92d5fa0a9..27ad870ae5 100644 --- a/includes/libs/filebackend/FileBackendMultiWrite.php +++ b/includes/libs/filebackend/FileBackendMultiWrite.php @@ -88,7 +88,7 @@ class FileBackendMultiWrite extends FileBackend { * any checks from "syncChecks" are still synchronous. * * @param array $config - * @throws FileBackendError + * @throws LogicException */ public function __construct( array $config ) { parent::__construct( $config ); @@ -178,9 +178,8 @@ class FileBackendMultiWrite extends FileBackend { $masterStatus = $mbe->doOperations( $realOps, $opts ); $status->merge( $masterStatus ); // Propagate the operations to the clone backends if there were no unexpected errors - // and if there were either no expected errors or if the 'force' option was used. - // However, if nothing succeeded at all, then don't replicate any of the operations. - // If $ops only had one operation, this might avoid backend sync inconsistencies. + // and everything didn't fail due to predicted errors. If $ops only had one operation, + // this might avoid backend sync inconsistencies. if ( $masterStatus->isOK() && $masterStatus->successCount > 0 ) { foreach ( $this->backends as $index => $backend ) { if ( $index === $this->masterIndex ) { @@ -271,7 +270,10 @@ class FileBackendMultiWrite extends FileBackend { continue; } } - if ( ( $this->syncChecks & self::CHECK_SHA1 ) && $cBackend->getFileSha1Base36( $cParams ) !== $mSha1 ) { // wrong SHA1 + if ( + ( $this->syncChecks & self::CHECK_SHA1 ) && + $cBackend->getFileSha1Base36( $cParams ) !== $mSha1 + ) { // wrong SHA1 $status->fatal( 'backend-fail-synced', $path ); continue; } diff --git a/includes/libs/filebackend/FileBackendStore.php b/includes/libs/filebackend/FileBackendStore.php index e2a25fcd51..aa95ee40bf 100644 --- a/includes/libs/filebackend/FileBackendStore.php +++ b/includes/libs/filebackend/FileBackendStore.php @@ -20,6 +20,7 @@ * @file * @ingroup FileBackend */ +use Wikimedia\AtEase\AtEase; use Wikimedia\Timestamp\ConvertibleTimestamp; /** @@ -376,9 +377,9 @@ abstract class FileBackendStore extends FileBackend { unset( $params['latest'] ); // sanity // Check that the specified temp file is valid... - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $ok = ( is_file( $tmpPath ) && filesize( $tmpPath ) == 0 ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); if ( !$ok ) { // not present or not empty $status->fatal( 'backend-fail-opentemp', $tmpPath ); @@ -714,9 +715,9 @@ abstract class FileBackendStore extends FileBackend { protected function doGetFileContentsMulti( array $params ) { $contents = []; foreach ( $this->doGetLocalReferenceMulti( $params ) as $path => $fsFile ) { - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $contents[$path] = $fsFile ? file_get_contents( $fsFile->getPath() ) : false; - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); } return $contents; diff --git a/includes/libs/filebackend/FileOpBatch.php b/includes/libs/filebackend/FileOpBatch.php index 540961edd1..bbcda085c0 100644 --- a/includes/libs/filebackend/FileOpBatch.php +++ b/includes/libs/filebackend/FileOpBatch.php @@ -46,7 +46,7 @@ class FileOpBatch { * * The resulting StatusValue will be "OK" unless: * - a) unexpected operation errors occurred (network partitions, disk full...) - * - b) significant operation errors occurred and 'force' was not set + * - b) predicted operation errors occurred and 'force' was not set * * @param FileOp[] $performOps List of FileOp operations * @param array $opts Batch operation options diff --git a/includes/libs/filebackend/HTTPFileStreamer.php b/includes/libs/filebackend/HTTPFileStreamer.php index 7a11aebf7e..653a102cc4 100644 --- a/includes/libs/filebackend/HTTPFileStreamer.php +++ b/includes/libs/filebackend/HTTPFileStreamer.php @@ -19,6 +19,8 @@ * * @file */ + +use Wikimedia\AtEase\AtEase; use Wikimedia\Timestamp\ConvertibleTimestamp; /** @@ -100,9 +102,9 @@ class HTTPFileStreamer { is_int( $header ) ? HttpStatus::header( $header ) : header( $header ); }; - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $info = stat( $this->path ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); if ( !is_array( $info ) ) { if ( $sendErrors ) { diff --git a/includes/libs/filebackend/MemoryFileBackend.php b/includes/libs/filebackend/MemoryFileBackend.php index 548c85c85d..f0cbf3bbcd 100644 --- a/includes/libs/filebackend/MemoryFileBackend.php +++ b/includes/libs/filebackend/MemoryFileBackend.php @@ -21,6 +21,8 @@ * @ingroup FileBackend */ +use Wikimedia\AtEase\AtEase; + /** * Simulation of a backend storage in memory. * @@ -70,9 +72,9 @@ class MemoryFileBackend extends FileBackendStore { return $status; } - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $data = file_get_contents( $params['src'] ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); if ( $data === false ) { // source doesn't exist? $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] ); @@ -168,7 +170,7 @@ class MemoryFileBackend extends FileBackendStore { } else { // Create a new temporary file with the same extension... $ext = FileBackend::extensionFromPath( $src ); - $fsFile = TempFSFile::factory( 'localcopy_', $ext, $this->tmpDirectory ); + $fsFile = $this->tmpFileFactory->newTempFSFile( 'localcopy_', $ext ); if ( $fsFile ) { $bytes = file_put_contents( $fsFile->getPath(), $this->files[$src]['data'] ); if ( $bytes !== strlen( $this->files[$src]['data'] ) ) { diff --git a/includes/libs/filebackend/SwiftFileBackend.php b/includes/libs/filebackend/SwiftFileBackend.php index a1b2460df6..afd1688c1c 100644 --- a/includes/libs/filebackend/SwiftFileBackend.php +++ b/includes/libs/filebackend/SwiftFileBackend.php @@ -22,6 +22,8 @@ * @author Russ Nelson */ +use Wikimedia\AtEase\AtEase; + /** * @brief Class for an OpenStack Swift (or Ceph RGW) based file backend. * @@ -326,9 +328,9 @@ class SwiftFileBackend extends FileBackendStore { return $status; } - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $sha1Hash = sha1_file( $params['src'] ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); if ( $sha1Hash === false ) { // source doesn't exist? $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] ); @@ -1150,7 +1152,7 @@ class SwiftFileBackend extends FileBackendStore { // Get source file extension $ext = FileBackend::extensionFromPath( $path ); // Create a new temporary file... - $tmpFile = TempFSFile::factory( 'localcopy_', $ext, $this->tmpDirectory ); + $tmpFile = $this->tmpFileFactory->newTempFSFile( 'localcopy_', $ext ); if ( $tmpFile ) { $handle = fopen( $tmpFile->getPath(), 'wb' ); if ( $handle ) { diff --git a/includes/libs/filebackend/fileop/FileOp.php b/includes/libs/filebackend/fileop/FileOp.php index 206048bd71..961fdb93b4 100644 --- a/includes/libs/filebackend/fileop/FileOp.php +++ b/includes/libs/filebackend/fileop/FileOp.php @@ -77,7 +77,7 @@ abstract class FileOp { * @param FileBackendStore $backend * @param array $params * @param LoggerInterface $logger PSR logger instance - * @throws FileBackendError + * @throws InvalidArgumentException */ final public function __construct( FileBackendStore $backend, array $params, LoggerInterface $logger diff --git a/includes/libs/filebackend/fileop/StoreFileOp.php b/includes/libs/filebackend/fileop/StoreFileOp.php index 69ae47f428..5783a822af 100644 --- a/includes/libs/filebackend/fileop/StoreFileOp.php +++ b/includes/libs/filebackend/fileop/StoreFileOp.php @@ -21,6 +21,8 @@ * @ingroup FileBackend */ +use Wikimedia\AtEase\AtEase; + /** * Store a file into the backend from a file on the file system. * Parameters for this operation are outlined in FileBackend::doOperations(). @@ -77,9 +79,9 @@ class StoreFileOp extends FileOp { } protected function getSourceSha1Base36() { - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $hash = sha1_file( $this->params['src'] ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); if ( $hash !== false ) { $hash = Wikimedia\base_convert( $hash, 16, 36, 31 ); } diff --git a/includes/libs/filebackend/fsfile/FSFile.php b/includes/libs/filebackend/fsfile/FSFile.php index 553c9aaf17..1937e37441 100644 --- a/includes/libs/filebackend/fsfile/FSFile.php +++ b/includes/libs/filebackend/fsfile/FSFile.php @@ -21,6 +21,8 @@ * @ingroup FileBackend */ +use Wikimedia\AtEase\AtEase; + /** * Class representing a non-directory file on the file system * @@ -75,9 +77,9 @@ class FSFile { * @return string|bool TS_MW timestamp or false on failure */ public function getTimestamp() { - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $timestamp = filemtime( $this->path ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); if ( $timestamp !== false ) { $timestamp = wfTimestamp( TS_MW, $timestamp ); } @@ -168,9 +170,9 @@ class FSFile { return $this->sha1Base36; } - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $this->sha1Base36 = sha1_file( $this->path ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); if ( $this->sha1Base36 !== false ) { $this->sha1Base36 = Wikimedia\base_convert( $this->sha1Base36, 16, 36, 31 ); diff --git a/includes/libs/filebackend/fsfile/TempFSFile.php b/includes/libs/filebackend/fsfile/TempFSFile.php index b993626fda..46fa5e1333 100644 --- a/includes/libs/filebackend/fsfile/TempFSFile.php +++ b/includes/libs/filebackend/fsfile/TempFSFile.php @@ -1,4 +1,7 @@ 1) for paths to delete on shutdown */ protected static $pathsCollect = null; + /** + * Do not call directly. Use TempFSFileFactory + * + * @param string $path + */ public function __construct( $path ) { parent::__construct( $path ); if ( self::$pathsCollect === null ) { + // @codeCoverageIgnoreStart self::$pathsCollect = []; register_shutdown_function( [ __CLASS__, 'purgeAllOnShutdown' ] ); + // @codeCoverageIgnoreEnd } } @@ -47,40 +59,23 @@ class TempFSFile extends FSFile { * Make a new temporary file on the file system. * Temporary files may be purged when the file object falls out of scope. * + * @deprecated since 1.34, use TempFSFileFactory directly + * * @param string $prefix * @param string $extension Optional file extension * @param string|null $tmpDirectory Optional parent directory * @return TempFSFile|null */ public static function factory( $prefix, $extension = '', $tmpDirectory = null ) { - $ext = ( $extension != '' ) ? ".{$extension}" : ''; - - $attempts = 5; - while ( $attempts-- ) { - $hex = sprintf( '%06x%06x', mt_rand( 0, 0xffffff ), mt_rand( 0, 0xffffff ) ); - if ( !is_string( $tmpDirectory ) ) { - $tmpDirectory = self::getUsableTempDirectory(); - } - $path = $tmpDirectory . '/' . $prefix . $hex . $ext; - Wikimedia\suppressWarnings(); - $newFileHandle = fopen( $path, 'x' ); - Wikimedia\restoreWarnings(); - if ( $newFileHandle ) { - fclose( $newFileHandle ); - $tmpFile = new self( $path ); - $tmpFile->autocollect(); - // Safely instantiated, end loop. - return $tmpFile; - } - } - - // Give up - return null; + return ( new TempFSFileFactory( $tmpDirectory ) )->newTempFSFile( $prefix, $extension ); } /** + * @todo Is there any useful way to test this? Would it be useful to make this non-static on + * TempFSFileFactory? + * * @return string Filesystem path to a temporary directory - * @throws RuntimeException + * @throws RuntimeException if no writable temporary directory can be found */ public static function getUsableTempDirectory() { $tmpDir = array_map( 'getenv', [ 'TMPDIR', 'TMP', 'TEMP' ] ); @@ -119,9 +114,9 @@ class TempFSFile extends FSFile { */ public function purge() { $this->canDelete = false; // done - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $ok = unlink( $this->path ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); unset( self::$pathsCollect[$this->path] ); @@ -176,12 +171,14 @@ class TempFSFile extends FSFile { * Try to make sure that all files are purged on error * * This method should only be called internally + * + * @codeCoverageIgnore */ public static function purgeAllOnShutdown() { foreach ( self::$pathsCollect as $path => $unused ) { - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); unlink( $path ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); } } diff --git a/includes/libs/filebackend/fsfile/TempFSFileFactory.php b/includes/libs/filebackend/fsfile/TempFSFileFactory.php new file mode 100644 index 0000000000..1120973803 --- /dev/null +++ b/includes/libs/filebackend/fsfile/TempFSFileFactory.php @@ -0,0 +1,56 @@ +tmpDirectory = $tmpDirectory; + } + + /** + * Make a new temporary file on the file system. + * Temporary files may be purged when the file object falls out of scope. + * + * @param string $prefix + * @param string $extension Optional file extension + * @return TempFSFile|null + */ + public function newTempFSFile( $prefix, $extension = '' ) { + $ext = ( $extension != '' ) ? ".{$extension}" : ''; + $tmpDirectory = $this->tmpDirectory; + if ( !is_string( $tmpDirectory ) ) { + $tmpDirectory = TempFSFile::getUsableTempDirectory(); + } + + $attempts = 5; + while ( $attempts-- ) { + $hex = sprintf( '%06x%06x', mt_rand( 0, 0xffffff ), mt_rand( 0, 0xffffff ) ); + $path = "$tmpDirectory/$prefix$hex$ext"; + \Wikimedia\suppressWarnings(); + $newFileHandle = fopen( $path, 'x' ); + \Wikimedia\restoreWarnings(); + if ( $newFileHandle ) { + fclose( $newFileHandle ); + $tmpFile = new TempFSFile( $path ); + $tmpFile->autocollect(); + // Safely instantiated, end loop. + return $tmpFile; + } + } + + // Give up + return null; // @codeCoverageIgnore + } +} diff --git a/includes/libs/objectcache/APCBagOStuff.php b/includes/libs/objectcache/APCBagOStuff.php index 0954ac8061..e9bd7bec90 100644 --- a/includes/libs/objectcache/APCBagOStuff.php +++ b/includes/libs/objectcache/APCBagOStuff.php @@ -73,7 +73,7 @@ class APCBagOStuff extends MediumSpecificBagOStuff { return true; } - public function add( $key, $value, $exptime = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) { return apc_add( $key . self::KEY_SUFFIX, $this->nativeSerialize ? $value : $this->serialize( $value ), @@ -87,11 +87,11 @@ class APCBagOStuff extends MediumSpecificBagOStuff { return true; } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { return apc_inc( $key . self::KEY_SUFFIX, $value ); } - public function decr( $key, $value = 1 ) { + public function decr( $key, $value = 1, $flags = 0 ) { return apc_dec( $key . self::KEY_SUFFIX, $value ); } } diff --git a/includes/libs/objectcache/APCUBagOStuff.php b/includes/libs/objectcache/APCUBagOStuff.php index 021cdf7b76..2b26500597 100644 --- a/includes/libs/objectcache/APCUBagOStuff.php +++ b/includes/libs/objectcache/APCUBagOStuff.php @@ -71,7 +71,7 @@ class APCUBagOStuff extends MediumSpecificBagOStuff { ); } - public function add( $key, $value, $exptime = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) { return apcu_add( $key . self::KEY_SUFFIX, $this->nativeSerialize ? $value : $this->serialize( $value ), @@ -85,7 +85,7 @@ class APCUBagOStuff extends MediumSpecificBagOStuff { return true; } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { // https://github.com/krakjoe/apcu/issues/166 if ( apcu_exists( $key . self::KEY_SUFFIX ) ) { return apcu_inc( $key . self::KEY_SUFFIX, $value ); @@ -94,7 +94,7 @@ class APCUBagOStuff extends MediumSpecificBagOStuff { } } - public function decr( $key, $value = 1 ) { + public function decr( $key, $value = 1, $flags = 0 ) { // https://github.com/krakjoe/apcu/issues/166 if ( apcu_exists( $key . self::KEY_SUFFIX ) ) { return apcu_dec( $key . self::KEY_SUFFIX, $value ); diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index da60c01959..42da5f070e 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -362,31 +362,36 @@ abstract class BagOStuff implements IExpiringStore, IStoreKeyEncoder, LoggerAwar * Increase stored value of $key by $value while preserving its TTL * @param string $key Key to increase * @param int $value Value to add to $key (default: 1) [optional] + * @param int $flags Bit field of class WRITE_* constants [optional] * @return int|bool New value or false on failure */ - abstract public function incr( $key, $value = 1 ); + abstract public function incr( $key, $value = 1, $flags = 0 ); /** * Decrease stored value of $key by $value while preserving its TTL * @param string $key * @param int $value Value to subtract from $key (default: 1) [optional] + * @param int $flags Bit field of class WRITE_* constants [optional] * @return int|bool New value or false on failure */ - abstract public function decr( $key, $value = 1 ); + abstract public function decr( $key, $value = 1, $flags = 0 ); /** - * Increase stored value of $key by $value while preserving its TTL + * Increase the value of the given key (no TTL change) if it exists or create it otherwise * - * This will create the key with value $init and TTL $ttl instead if not present + * This will create the key with the value $init and TTL $ttl instead if not present. + * Callers should make sure that both ($init - $value) and $ttl are invariants for all + * operations to any given key. The value of $init should be at least that of $value. * - * @param string $key - * @param int $ttl - * @param int $value - * @param int $init + * @param string $key Key built via makeKey() or makeGlobalKey() + * @param int $exptime Time-to-live (in seconds) or a UNIX timestamp expiration + * @param int $value Amount to increase the key value by [default: 1] + * @param int|null $init Value to initialize the key to if it does not exist [default: $value] + * @param int $flags Bit field of class WRITE_* constants [optional] * @return int|bool New value or false on failure * @since 1.24 */ - abstract public function incrWithInit( $key, $ttl, $value = 1, $init = 1 ); + abstract public function incrWithInit( $key, $exptime, $value = 1, $init = null, $flags = 0 ); /** * Get the "last error" registered; clearLastError() should be called manually @@ -478,6 +483,16 @@ abstract class BagOStuff implements IExpiringStore, IStoreKeyEncoder, LoggerAwar return INF; } + /** + * @param int $field + * @param int $flags + * @return bool + * @since 1.34 + */ + final protected function fieldHasFlags( $field, $flags ) { + return ( ( $field & $flags ) === $flags ); + } + /** * Merge the flag maps of one or more BagOStuff objects into a "lowest common denominator" map * diff --git a/includes/libs/objectcache/CachedBagOStuff.php b/includes/libs/objectcache/CachedBagOStuff.php index 0ab26c9520..8b4c9c686f 100644 --- a/includes/libs/objectcache/CachedBagOStuff.php +++ b/includes/libs/objectcache/CachedBagOStuff.php @@ -79,7 +79,7 @@ class CachedBagOStuff extends BagOStuff { } } - $valuesByKeyFetched = $this->backend->getMulti( $keys, $flags ); + $valuesByKeyFetched = $this->backend->getMulti( $keysMissing, $flags ); $this->setMulti( $valuesByKeyFetched, self::TTL_INDEFINITE, self::WRITE_CACHE_ONLY ); return $valuesByKeyCached + $valuesByKeyFetched; @@ -87,7 +87,8 @@ class CachedBagOStuff extends BagOStuff { public function set( $key, $value, $exptime = 0, $flags = 0 ) { $this->procCache->set( $key, $value, $exptime, $flags ); - if ( ( $flags & self::WRITE_CACHE_ONLY ) != self::WRITE_CACHE_ONLY ) { + + if ( !$this->fieldHasFlags( $flags, self::WRITE_CACHE_ONLY ) ) { $this->backend->set( $key, $value, $exptime, $flags ); } @@ -96,7 +97,8 @@ class CachedBagOStuff extends BagOStuff { public function delete( $key, $flags = 0 ) { $this->procCache->delete( $key, $flags ); - if ( ( $flags & self::WRITE_CACHE_ONLY ) != self::WRITE_CACHE_ONLY ) { + + if ( !$this->fieldHasFlags( $flags, self::WRITE_CACHE_ONLY ) ) { $this->backend->delete( $key, $flags ); } @@ -166,7 +168,8 @@ class CachedBagOStuff extends BagOStuff { public function setMulti( array $data, $exptime = 0, $flags = 0 ) { $this->procCache->setMulti( $data, $exptime, $flags ); - if ( ( $flags & self::WRITE_CACHE_ONLY ) != self::WRITE_CACHE_ONLY ) { + + if ( !$this->fieldHasFlags( $flags, self::WRITE_CACHE_ONLY ) ) { return $this->backend->setMulti( $data, $exptime, $flags ); } @@ -175,7 +178,8 @@ class CachedBagOStuff extends BagOStuff { public function deleteMulti( array $keys, $flags = 0 ) { $this->procCache->deleteMulti( $keys, $flags ); - if ( ( $flags & self::WRITE_CACHE_ONLY ) != self::WRITE_CACHE_ONLY ) { + + if ( !$this->fieldHasFlags( $flags, self::WRITE_CACHE_ONLY ) ) { return $this->backend->deleteMulti( $keys, $flags ); } @@ -184,29 +188,30 @@ class CachedBagOStuff extends BagOStuff { public function changeTTLMulti( array $keys, $exptime, $flags = 0 ) { $this->procCache->changeTTLMulti( $keys, $exptime, $flags ); - if ( ( $flags & self::WRITE_CACHE_ONLY ) != self::WRITE_CACHE_ONLY ) { + + if ( !$this->fieldHasFlags( $flags, self::WRITE_CACHE_ONLY ) ) { return $this->backend->changeTTLMulti( $keys, $exptime, $flags ); } return true; } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { $this->procCache->delete( $key ); - return $this->backend->incr( $key, $value ); + return $this->backend->incr( $key, $value, $flags ); } - public function decr( $key, $value = 1 ) { + public function decr( $key, $value = 1, $flags = 0 ) { $this->procCache->delete( $key ); - return $this->backend->decr( $key, $value ); + return $this->backend->decr( $key, $value, $flags ); } - public function incrWithInit( $key, $ttl, $value = 1, $init = 1 ) { + public function incrWithInit( $key, $exptime, $value = 1, $init = null, $flags = 0 ) { $this->procCache->delete( $key ); - return $this->backend->incrWithInit( $key, $ttl, $value, $init ); + return $this->backend->incrWithInit( $key, $exptime, $value, $init, $flags ); } public function addBusyCallback( callable $workCallback ) { diff --git a/includes/libs/objectcache/EmptyBagOStuff.php b/includes/libs/objectcache/EmptyBagOStuff.php index dab8ba1d35..9723cadd97 100644 --- a/includes/libs/objectcache/EmptyBagOStuff.php +++ b/includes/libs/objectcache/EmptyBagOStuff.php @@ -41,15 +41,19 @@ class EmptyBagOStuff extends MediumSpecificBagOStuff { return true; } - public function add( $key, $value, $exptime = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) { return true; } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { return false; } - public function incrWithInit( $key, $ttl, $value = 1, $init = 1 ) { + public function decr( $key, $value = 1, $flags = 0 ) { + return false; + } + + public function incrWithInit( $key, $exptime, $value = 1, $init = null, $flags = 0 ) { return false; // faster } diff --git a/includes/libs/objectcache/HashBagOStuff.php b/includes/libs/objectcache/HashBagOStuff.php index 1cfa0c7921..6d0940b557 100644 --- a/includes/libs/objectcache/HashBagOStuff.php +++ b/includes/libs/objectcache/HashBagOStuff.php @@ -94,7 +94,7 @@ class HashBagOStuff extends MediumSpecificBagOStuff { return true; } - public function add( $key, $value, $exptime = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) { if ( $this->hasKey( $key ) && !$this->expire( $key ) ) { return false; // key already set } @@ -108,10 +108,10 @@ class HashBagOStuff extends MediumSpecificBagOStuff { return true; } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { $n = $this->get( $key ); if ( $this->isInteger( $n ) ) { - $n = max( $n + intval( $value ), 0 ); + $n = max( $n + (int)$value, 0 ); $this->bag[$key][self::KEY_VAL] = $n; return $n; @@ -120,6 +120,10 @@ class HashBagOStuff extends MediumSpecificBagOStuff { return false; } + public function decr( $key, $value = 1, $flags = 0 ) { + return $this->incr( $key, -$value, $flags ); + } + /** * Clear all values in cache */ diff --git a/includes/libs/objectcache/MediumSpecificBagOStuff.php b/includes/libs/objectcache/MediumSpecificBagOStuff.php index fe17628e81..cb3f621f8f 100644 --- a/includes/libs/objectcache/MediumSpecificBagOStuff.php +++ b/includes/libs/objectcache/MediumSpecificBagOStuff.php @@ -160,57 +160,9 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { * @return bool Success */ public function set( $key, $value, $exptime = 0, $flags = 0 ) { - if ( - is_int( $value ) || // avoid breaking incr()/decr() - ( $flags & self::WRITE_ALLOW_SEGMENTS ) != self::WRITE_ALLOW_SEGMENTS || - is_infinite( $this->segmentationSize ) - ) { - return $this->doSet( $key, $value, $exptime, $flags ); - } - - $serialized = $this->serialize( $value ); - $segmentSize = $this->getSegmentationSize(); - $maxTotalSize = $this->getSegmentedValueMaxSize(); - - $size = strlen( $serialized ); - if ( $size <= $segmentSize ) { - // Since the work of serializing it was already done, just use it inline - return $this->doSet( - $key, - SerializedValueContainer::newUnified( $serialized ), - $exptime, - $flags - ); - } elseif ( $size > $maxTotalSize ) { - $this->setLastError( "Key $key exceeded $maxTotalSize bytes." ); - - return false; - } - - $chunksByKey = []; - $segmentHashes = []; - $count = intdiv( $size, $segmentSize ) + ( ( $size % $segmentSize ) ? 1 : 0 ); - for ( $i = 0; $i < $count; ++$i ) { - $segment = substr( $serialized, $i * $segmentSize, $segmentSize ); - $hash = sha1( $segment ); - $chunkKey = $this->makeGlobalKey( self::SEGMENT_COMPONENT, $key, $hash ); - $chunksByKey[$chunkKey] = $segment; - $segmentHashes[] = $hash; - } - - $flags &= ~self::WRITE_ALLOW_SEGMENTS; // sanity - $ok = $this->setMulti( $chunksByKey, $exptime, $flags ); - if ( $ok ) { - // Only when all segments are stored should the main key be changed - $ok = $this->doSet( - $key, - SerializedValueContainer::newSegmented( $segmentHashes ), - $exptime, - $flags - ); - } - - return $ok; + list( $entry, $usable ) = $this->makeValueOrSegmentList( $key, $value, $exptime, $flags ); + // Only when all segments (if any) are stored should the main key be changed + return $usable ? $this->doSet( $key, $entry, $exptime, $flags ) : false; } /** @@ -236,7 +188,7 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { * @return bool True if the item was deleted or not found, false on failure */ public function delete( $key, $flags = 0 ) { - if ( ( $flags & self::WRITE_PRUNE_SEGMENTS ) != self::WRITE_PRUNE_SEGMENTS ) { + if ( !$this->fieldHasFlags( $flags, self::WRITE_PRUNE_SEGMENTS ) ) { return $this->doDelete( $key, $flags ); } @@ -256,7 +208,7 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { $mainValue->{SerializedValueContainer::SEGMENTED_HASHES} ); - return $this->deleteMulti( $orderedKeys, $flags ); + return $this->deleteMulti( $orderedKeys, $flags & ~self::WRITE_PRUNE_SEGMENTS ); } /** @@ -268,6 +220,23 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { */ abstract protected function doDelete( $key, $flags = 0 ); + public function add( $key, $value, $exptime = 0, $flags = 0 ) { + list( $entry, $usable ) = $this->makeValueOrSegmentList( $key, $value, $exptime, $flags ); + // Only when all segments (if any) are stored should the main key be changed + return $usable ? $this->doAdd( $key, $entry, $exptime, $flags ) : false; + } + + /** + * Insert an item if it does not already exist + * + * @param string $key + * @param mixed $value + * @param int $exptime + * @param int $flags Bitfield of BagOStuff::WRITE_* constants (since 1.33) + * @return bool Success + */ + abstract protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ); + /** * Merge changes into the existing cache value (possibly creating a new one) * @@ -283,7 +252,6 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { * @param int $attempts The amount of times to attempt a merge in case of failure * @param int $flags Bitfield of BagOStuff::WRITE_* constants * @return bool Success - * @throws InvalidArgumentException */ public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) { return $this->mergeViaCas( $key, $callback, $exptime, $attempts, $flags ); @@ -297,51 +265,56 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { * @param int $flags Bitfield of BagOStuff::WRITE_* constants * @return bool Success * @see BagOStuff::merge() - * */ final protected function mergeViaCas( $key, callable $callback, $exptime, $attempts, $flags ) { + $attemptsLeft = $attempts; do { - $casToken = null; // passed by reference + $token = null; // passed by reference // Get the old value and CAS token from cache $this->clearLastError(); $currentValue = $this->resolveSegments( $key, - $this->doGet( $key, self::READ_LATEST, $casToken ) + $this->doGet( $key, $flags, $token ) ); if ( $this->getLastError() ) { + // Don't spam slow retries due to network problems (retry only on races) $this->logger->warning( - __METHOD__ . ' failed due to I/O error on get() for {key}.', + __METHOD__ . ' failed due to read I/O error on get() for {key}.', [ 'key' => $key ] ); - - return false; // don't spam retries (retry only on races) + $success = false; + break; } // Derive the new value from the old value $value = call_user_func( $callback, $this, $key, $currentValue, $exptime ); - $hadNoCurrentValue = ( $currentValue === false ); + $keyWasNonexistant = ( $currentValue === false ); + $valueMatchesOldValue = ( $value === $currentValue ); unset( $currentValue ); // free RAM in case the value is large $this->clearLastError(); if ( $value === false ) { $success = true; // do nothing - } elseif ( $hadNoCurrentValue ) { + } elseif ( $valueMatchesOldValue && $attemptsLeft !== $attempts ) { + $success = true; // recently set by another thread to the same value + } elseif ( $keyWasNonexistant ) { // Try to create the key, failing if it gets created in the meantime $success = $this->add( $key, $value, $exptime, $flags ); } else { // Try to update the key, failing if it gets changed in the meantime - $success = $this->cas( $casToken, $key, $value, $exptime, $flags ); + $success = $this->cas( $token, $key, $value, $exptime, $flags ); } if ( $this->getLastError() ) { + // Don't spam slow retries due to network problems (retry only on races) $this->logger->warning( - __METHOD__ . ' failed due to I/O error for {key}.', + __METHOD__ . ' failed due to write I/O error for {key}.', [ 'key' => $key ] ); - - return false; // IO error; don't spam retries + $success = false; + break; } - } while ( !$success && --$attempts ); + } while ( !$success && --$attemptsLeft ); return $success; } @@ -357,21 +330,58 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { * @return bool Success */ protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { + if ( $casToken === null ) { + $this->logger->warning( + __METHOD__ . ' got empty CAS token for {key}.', + [ 'key' => $key ] + ); + + return false; // caller may have meant to use add()? + } + + list( $entry, $usable ) = $this->makeValueOrSegmentList( $key, $value, $exptime, $flags ); + // Only when all segments (if any) are stored should the main key be changed + return $usable ? $this->doCas( $casToken, $key, $entry, $exptime, $flags ) : false; + } + + /** + * Check and set an item + * + * @param mixed $casToken + * @param string $key + * @param mixed $value + * @param int $exptime Either an interval in seconds or a unix timestamp for expiry + * @param int $flags Bitfield of BagOStuff::WRITE_* constants + * @return bool Success + */ + protected function doCas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { + // @TODO: the lock() call assumes that all other relavent sets() use one if ( !$this->lock( $key, 0 ) ) { return false; // non-blocking } $curCasToken = null; // passed by reference + $this->clearLastError(); $this->doGet( $key, self::READ_LATEST, $curCasToken ); - if ( $casToken === $curCasToken ) { - $success = $this->set( $key, $value, $exptime, $flags ); + if ( is_object( $curCasToken ) ) { + // Using === does not work with objects since it checks for instance identity + throw new UnexpectedValueException( "CAS token cannot be an object" ); + } + if ( $this->getLastError() ) { + // Fail if the old CAS token could not be read + $success = false; + $this->logger->warning( + __METHOD__ . ' failed due to write I/O error for {key}.', + [ 'key' => $key ] + ); + } elseif ( $casToken === $curCasToken ) { + $success = $this->doSet( $key, $value, $exptime, $flags ); } else { + $success = false; // mismatched or failed $this->logger->info( __METHOD__ . ' failed due to race condition for {key}.', [ 'key' => $key ] ); - - $success = false; // mismatched or failed } $this->unlock( $key ); @@ -588,9 +598,10 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { * @since 1.24 */ public function setMulti( array $data, $exptime = 0, $flags = 0 ) { - if ( ( $flags & self::WRITE_ALLOW_SEGMENTS ) === self::WRITE_ALLOW_SEGMENTS ) { + if ( $this->fieldHasFlags( $flags, self::WRITE_ALLOW_SEGMENTS ) ) { throw new InvalidArgumentException( __METHOD__ . ' got WRITE_ALLOW_SEGMENTS' ); } + return $this->doSetMulti( $data, $exptime, $flags ); } @@ -605,6 +616,7 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { foreach ( $data as $key => $value ) { $res = $this->doSet( $key, $value, $exptime, $flags ) && $res; } + return $res; } @@ -619,9 +631,10 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { * @since 1.33 */ public function deleteMulti( array $keys, $flags = 0 ) { - if ( ( $flags & self::WRITE_ALLOW_SEGMENTS ) === self::WRITE_ALLOW_SEGMENTS ) { - throw new InvalidArgumentException( __METHOD__ . ' got WRITE_ALLOW_SEGMENTS' ); + if ( $this->fieldHasFlags( $flags, self::WRITE_PRUNE_SEGMENTS ) ) { + throw new InvalidArgumentException( __METHOD__ . ' got WRITE_PRUNE_SEGMENTS' ); } + return $this->doDeleteMulti( $keys, $flags ); } @@ -658,37 +671,16 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { return $res; } - /** - * Decrease stored value of $key by $value while preserving its TTL - * @param string $key - * @param int $value Value to subtract from $key (default: 1) [optional] - * @return int|bool New value or false on failure - */ - public function decr( $key, $value = 1 ) { - return $this->incr( $key, -$value ); - } - - /** - * Increase stored value of $key by $value while preserving its TTL - * - * This will create the key with value $init and TTL $ttl instead if not present - * - * @param string $key - * @param int $ttl - * @param int $value - * @param int $init - * @return int|bool New value or false on failure - * @since 1.24 - */ - public function incrWithInit( $key, $ttl, $value = 1, $init = 1 ) { + public function incrWithInit( $key, $exptime, $value = 1, $init = null, $flags = 0 ) { + $init = is_int( $init ) ? $init : $value; $this->clearLastError(); - $newValue = $this->incr( $key, $value ); + $newValue = $this->incr( $key, $value, $flags ); if ( $newValue === false && !$this->getLastError() ) { // No key set; initialize - $newValue = $this->add( $key, (int)$init, $ttl ) ? $init : false; + $newValue = $this->add( $key, (int)$init, $exptime, $flags ) ? $init : false; if ( $newValue === false && !$this->getLastError() ) { // Raced out initializing; increment - $newValue = $this->incr( $key, $value ); + $newValue = $this->incr( $key, $value, $flags ); } } @@ -758,37 +750,70 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { $this->lastError = $err; } - /** - * Let a callback be run to avoid wasting time on special blocking calls - * - * The callbacks may or may not be called ever, in any particular order. - * They are likely to be invoked when something WRITE_SYNC is used used. - * They should follow a caching pattern as shown below, so that any code - * using the work will get it's result no matter what happens. - * @code - * $result = null; - * $workCallback = function () use ( &$result ) { - * if ( !$result ) { - * $result = .... - * } - * return $result; - * } - * @endcode - * - * @param callable $workCallback - * @since 1.28 - */ final public function addBusyCallback( callable $workCallback ) { $this->busyCallbacks[] = $workCallback; } /** + * Determine the entry (inline or segment list) to store under a key to save the value + * + * @param string $key + * @param mixed $value * @param int $exptime - * @return bool + * @param int $flags + * @return array (inline value or segment list, whether the entry is usable) + * @since 1.34 + */ + final protected function makeValueOrSegmentList( $key, $value, $exptime, $flags ) { + $entry = $value; + $usable = true; + + if ( + $this->fieldHasFlags( $flags, self::WRITE_ALLOW_SEGMENTS ) && + !is_int( $value ) && // avoid breaking incr()/decr() + is_finite( $this->segmentationSize ) + ) { + $segmentSize = $this->segmentationSize; + $maxTotalSize = $this->segmentedValueMaxSize; + + $serialized = $this->serialize( $value ); + $size = strlen( $serialized ); + if ( $size > $maxTotalSize ) { + $this->logger->warning( + "Value for {key} exceeds $maxTotalSize bytes; cannot segment.", + [ 'key' => $key ] + ); + } elseif ( $size <= $segmentSize ) { + // The serialized value was already computed, so just use it inline + $entry = SerializedValueContainer::newUnified( $serialized ); + } else { + // Split the serialized value into chunks and store them at different keys + $chunksByKey = []; + $segmentHashes = []; + $count = intdiv( $size, $segmentSize ) + ( ( $size % $segmentSize ) ? 1 : 0 ); + for ( $i = 0; $i < $count; ++$i ) { + $segment = substr( $serialized, $i * $segmentSize, $segmentSize ); + $hash = sha1( $segment ); + $chunkKey = $this->makeGlobalKey( self::SEGMENT_COMPONENT, $key, $hash ); + $chunksByKey[$chunkKey] = $segment; + $segmentHashes[] = $hash; + } + $flags &= ~self::WRITE_ALLOW_SEGMENTS; // sanity + $usable = $this->setMulti( $chunksByKey, $exptime, $flags ); + $entry = SerializedValueContainer::newSegmented( $segmentHashes ); + } + } + + return [ $entry, $usable ]; + } + + /** + * @param int|float $exptime + * @return bool Whether the expiry is non-infinite, and, negative or not a UNIX timestamp * @since 1.34 */ final protected function isRelativeExpiration( $exptime ) { - return ( $exptime != self::TTL_INDEFINITE && $exptime < ( 10 * self::TTL_YEAR ) ); + return ( $exptime !== self::TTL_INDEFINITE && $exptime < ( 10 * self::TTL_YEAR ) ); } /** @@ -856,14 +881,6 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { return ( $value === (string)$integer ); } - /** - * Construct a cache key. - * - * @param string $keyspace - * @param array $args - * @return string Colon-delimited list of $keyspace followed by escaped components of $args - * @since 1.27 - */ public function makeKeyInternal( $keyspace, $args ) { $key = $keyspace; foreach ( $args as $arg ) { @@ -905,18 +922,10 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { return $this->attrMap[$flag] ?? self::QOS_UNKNOWN; } - /** - * @return int|float The chunk size, in bytes, of segmented objects (INF for no limit) - * @since 1.34 - */ public function getSegmentationSize() { return $this->segmentationSize; } - /** - * @return int|float Maximum total segmented object size in bytes (INF for no limit) - * @since 1.34 - */ public function getSegmentedValueMaxSize() { return $this->segmentedValueMaxSize; } diff --git a/includes/libs/objectcache/MemcachedBagOStuff.php b/includes/libs/objectcache/MemcachedBagOStuff.php index ff9dedf3a1..dc409315f8 100644 --- a/includes/libs/objectcache/MemcachedBagOStuff.php +++ b/includes/libs/objectcache/MemcachedBagOStuff.php @@ -96,17 +96,24 @@ abstract class MemcachedBagOStuff extends MediumSpecificBagOStuff { } /** - * TTLs higher than 30 days will be detected as absolute TTLs - * (UNIX timestamps), and will result in the cache entry being - * discarded immediately because the expiry is in the past. - * Clamp expires >30d at 30d, unless they're >=1e9 in which - * case they are likely to really be absolute (1e9 = 2011-09-09) - * @param int $exptime + * @param int|float $exptime * @return int */ protected function fixExpiry( $exptime ) { - return ( $exptime > self::TTL_MONTH && !$this->isRelativeExpiration( $exptime ) ) - ? self::TTL_MONTH - : (int)$exptime; + if ( $exptime < 0 ) { + // The PECL driver does not seem to like negative relative values + $expiresAt = $this->getCurrentTime() + $exptime; + } elseif ( $this->isRelativeExpiration( $exptime ) ) { + // TTLs higher than 30 days will be detected as absolute TTLs + // (UNIX timestamps), and will result in the cache entry being + // discarded immediately because the expiry is in the past. + // Clamp expires >30d at 30d, unless they're >=1e9 in which + // case they are likely to really be absolute (1e9 = 2011-09-09) + $expiresAt = min( $exptime, self::TTL_MONTH ); + } else { + $expiresAt = $exptime; + } + + return (int)$expiresAt; } } diff --git a/includes/libs/objectcache/MemcachedClient.php b/includes/libs/objectcache/MemcachedClient.php deleted file mode 100644 index eecf7ec799..0000000000 --- a/includes/libs/objectcache/MemcachedClient.php +++ /dev/null @@ -1,1330 +0,0 @@ - | - * | All rights reserved. | - * | | - * | Redistribution and use in source and binary forms, with or without | - * | modification, are permitted provided that the following conditions | - * | are met: | - * | | - * | 1. Redistributions of source code must retain the above copyright | - * | notice, this list of conditions and the following disclaimer. | - * | 2. Redistributions in binary form must reproduce the above copyright | - * | notice, this list of conditions and the following disclaimer in the | - * | documentation and/or other materials provided with the distribution. | - * | | - * | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | - * | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | - * | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | - * | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | - * | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | - * | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | - * | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | - * | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | - * | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | - * | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | - * +---------------------------------------------------------------------------+ - * | Author: Ryan T. Dean | - * | Heavily influenced by the Perl memcached client by Brad Fitzpatrick. | - * | Permission granted by Brad Fitzpatrick for relicense of ported Perl | - * | client logic under 2-clause BSD license. | - * +---------------------------------------------------------------------------+ - * - * @file - * $TCAnet$ - */ - -/** - * This is a PHP client for memcached - a distributed memory cache daemon. - * - * More information is available at http://www.danga.com/memcached/ - * - * Usage example: - * - * $mc = new MemcachedClient(array( - * 'servers' => array( - * '127.0.0.1:10000', - * array( '192.0.0.1:10010', 2 ), - * '127.0.0.1:10020' - * ), - * 'debug' => false, - * 'compress_threshold' => 10240, - * 'persistent' => true - * )); - * - * $mc->add( 'key', array( 'some', 'array' ) ); - * $mc->replace( 'key', 'some random string' ); - * $val = $mc->get( 'key' ); - * - * @author Ryan T. Dean - * @version 0.1.2 - */ - -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; - -// {{{ class MemcachedClient -/** - * memcached client class implemented using (p)fsockopen() - * - * @author Ryan T. Dean - * @ingroup Cache - */ -class MemcachedClient { - // {{{ properties - // {{{ public - - // {{{ constants - // {{{ flags - - /** - * Flag: indicates data is serialized - */ - const SERIALIZED = 1; - - /** - * Flag: indicates data is compressed - */ - const COMPRESSED = 2; - - /** - * Flag: indicates data is an integer - */ - const INTVAL = 4; - - // }}} - - /** - * Minimum savings to store data compressed - */ - const COMPRESSION_SAVINGS = 0.20; - - // }}} - - /** - * Command statistics - * - * @var array - * @access public - */ - public $stats; - - // }}} - // {{{ private - - /** - * Cached Sockets that are connected - * - * @var array - * @access private - */ - public $_cache_sock; - - /** - * Current debug status; 0 - none to 9 - profiling - * - * @var bool - * @access private - */ - public $_debug; - - /** - * Dead hosts, assoc array, 'host'=>'unixtime when ok to check again' - * - * @var array - * @access private - */ - public $_host_dead; - - /** - * Is compression available? - * - * @var bool - * @access private - */ - public $_have_zlib; - - /** - * Do we want to use compression? - * - * @var bool - * @access private - */ - public $_compress_enable; - - /** - * At how many bytes should we compress? - * - * @var int - * @access private - */ - public $_compress_threshold; - - /** - * Are we using persistent links? - * - * @var bool - * @access private - */ - public $_persistent; - - /** - * If only using one server; contains ip:port to connect to - * - * @var string - * @access private - */ - public $_single_sock; - - /** - * Array containing ip:port or array(ip:port, weight) - * - * @var array - * @access private - */ - public $_servers; - - /** - * Our bit buckets - * - * @var array - * @access private - */ - public $_buckets; - - /** - * Total # of bit buckets we have - * - * @var int - * @access private - */ - public $_bucketcount; - - /** - * # of total servers we have - * - * @var int - * @access private - */ - public $_active; - - /** - * Stream timeout in seconds. Applies for example to fread() - * - * @var int - * @access private - */ - public $_timeout_seconds; - - /** - * Stream timeout in microseconds - * - * @var int - * @access private - */ - public $_timeout_microseconds; - - /** - * Connect timeout in seconds - */ - public $_connect_timeout; - - /** - * Number of connection attempts for each server - */ - public $_connect_attempts; - - /** - * @var LoggerInterface - */ - private $_logger; - - // }}} - // }}} - // {{{ methods - // {{{ public functions - // {{{ memcached() - - /** - * Memcache initializer - * - * @param array $args Associative array of settings - */ - public function __construct( $args ) { - $this->set_servers( $args['servers'] ?? array() ); - $this->_debug = $args['debug'] ?? false; - $this->stats = array(); - $this->_compress_threshold = $args['compress_threshold'] ?? 0; - $this->_persistent = $args['persistent'] ?? false; - $this->_compress_enable = true; - $this->_have_zlib = function_exists( 'gzcompress' ); - - $this->_cache_sock = array(); - $this->_host_dead = array(); - - $this->_timeout_seconds = 0; - $this->_timeout_microseconds = $args['timeout'] ?? 500000; - - $this->_connect_timeout = $args['connect_timeout'] ?? 0.1; - $this->_connect_attempts = 2; - - $this->_logger = $args['logger'] ?? new NullLogger(); - } - - // }}} - - /** - * @param mixed $value - * @return string|integer - */ - public function serialize( $value ) { - return serialize( $value ); - } - - /** - * @param string $value - * @return mixed - */ - public function unserialize( $value ) { - return unserialize( $value ); - } - - // {{{ add() - - /** - * Adds a key/value to the memcache server if one isn't already set with - * that key - * - * @param string $key Key to set with data - * @param mixed $val Value to store - * @param int $exp (optional) Expiration time. This can be a number of seconds - * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or - * longer must be the timestamp of the time at which the mapping should expire. It - * is safe to use timestamps in all cases, regardless of expiration - * eg: strtotime("+3 hour") - * - * @return bool - */ - public function add( $key, $val, $exp = 0 ) { - return $this->_set( 'add', $key, $val, $exp ); - } - - // }}} - // {{{ decr() - - /** - * Decrease a value stored on the memcache server - * - * @param string $key Key to decrease - * @param int $amt (optional) amount to decrease - * - * @return mixed False on failure, value on success - */ - public function decr( $key, $amt = 1 ) { - return $this->_incrdecr( 'decr', $key, $amt ); - } - - // }}} - // {{{ delete() - - /** - * Deletes a key from the server, optionally after $time - * - * @param string $key Key to delete - * @param int $time (optional) how long to wait before deleting - * - * @return bool True on success, false on failure - */ - public function delete( $key, $time = 0 ) { - if ( !$this->_active ) { - return false; - } - - $sock = $this->get_sock( $key ); - if ( !is_resource( $sock ) ) { - return false; - } - - $key = is_array( $key ) ? $key[1] : $key; - - if ( isset( $this->stats['delete'] ) ) { - $this->stats['delete']++; - } else { - $this->stats['delete'] = 1; - } - $cmd = "delete $key $time\r\n"; - if ( !$this->_fwrite( $sock, $cmd ) ) { - return false; - } - $res = $this->_fgets( $sock ); - - if ( $this->_debug ) { - $this->_debugprint( sprintf( "MemCache: delete %s (%s)", $key, $res ) ); - } - - if ( $res == "DELETED" || $res == "NOT_FOUND" ) { - return true; - } - - return false; - } - - /** - * Changes the TTL on a key from the server to $time - * - * @param string $key - * @param int $time TTL in seconds - * - * @return bool True on success, false on failure - */ - public function touch( $key, $time = 0 ) { - if ( !$this->_active ) { - return false; - } - - $sock = $this->get_sock( $key ); - if ( !is_resource( $sock ) ) { - return false; - } - - $key = is_array( $key ) ? $key[1] : $key; - - if ( isset( $this->stats['touch'] ) ) { - $this->stats['touch']++; - } else { - $this->stats['touch'] = 1; - } - $cmd = "touch $key $time\r\n"; - if ( !$this->_fwrite( $sock, $cmd ) ) { - return false; - } - $res = $this->_fgets( $sock ); - - if ( $this->_debug ) { - $this->_debugprint( sprintf( "MemCache: touch %s (%s)", $key, $res ) ); - } - - if ( $res == "TOUCHED" ) { - return true; - } - - return false; - } - - /** - * @param string $key - * @param int $timeout - * @return bool - */ - public function lock( $key, $timeout = 0 ) { - /* stub */ - return true; - } - - /** - * @param string $key - * @return bool - */ - public function unlock( $key ) { - /* stub */ - return true; - } - - // }}} - // {{{ disconnect_all() - - /** - * Disconnects all connected sockets - */ - public function disconnect_all() { - foreach ( $this->_cache_sock as $sock ) { - fclose( $sock ); - } - - $this->_cache_sock = array(); - } - - // }}} - // {{{ enable_compress() - - /** - * Enable / Disable compression - * - * @param bool $enable True to enable, false to disable - */ - public function enable_compress( $enable ) { - $this->_compress_enable = $enable; - } - - // }}} - // {{{ forget_dead_hosts() - - /** - * Forget about all of the dead hosts - */ - public function forget_dead_hosts() { - $this->_host_dead = array(); - } - - // }}} - // {{{ get() - - /** - * Retrieves the value associated with the key from the memcache server - * - * @param array|string $key key to retrieve - * @param float $casToken [optional] - * - * @return mixed - */ - public function get( $key, &$casToken = null ) { - if ( $this->_debug ) { - $this->_debugprint( "get($key)" ); - } - - if ( !is_array( $key ) && strval( $key ) === '' ) { - $this->_debugprint( "Skipping key which equals to an empty string" ); - return false; - } - - if ( !$this->_active ) { - return false; - } - - $sock = $this->get_sock( $key ); - - if ( !is_resource( $sock ) ) { - return false; - } - - $key = is_array( $key ) ? $key[1] : $key; - if ( isset( $this->stats['get'] ) ) { - $this->stats['get']++; - } else { - $this->stats['get'] = 1; - } - - $cmd = "gets $key\r\n"; - if ( !$this->_fwrite( $sock, $cmd ) ) { - return false; - } - - $val = array(); - $this->_load_items( $sock, $val, $casToken ); - - if ( $this->_debug ) { - foreach ( $val as $k => $v ) { - $this->_debugprint( - sprintf( "MemCache: sock %s got %s", $this->serialize( $sock ), $k ) ); - } - } - - $value = false; - if ( isset( $val[$key] ) ) { - $value = $val[$key]; - } - return $value; - } - - // }}} - // {{{ get_multi() - - /** - * Get multiple keys from the server(s) - * - * @param array $keys Keys to retrieve - * - * @return array - */ - public function get_multi( $keys ) { - if ( !$this->_active ) { - return array(); - } - - if ( isset( $this->stats['get_multi'] ) ) { - $this->stats['get_multi']++; - } else { - $this->stats['get_multi'] = 1; - } - $sock_keys = array(); - $socks = array(); - foreach ( $keys as $key ) { - $sock = $this->get_sock( $key ); - if ( !is_resource( $sock ) ) { - continue; - } - $key = is_array( $key ) ? $key[1] : $key; - if ( !isset( $sock_keys[$sock] ) ) { - $sock_keys[intval( $sock )] = array(); - $socks[] = $sock; - } - $sock_keys[intval( $sock )][] = $key; - } - - $gather = array(); - // Send out the requests - foreach ( $socks as $sock ) { - $cmd = 'gets'; - foreach ( $sock_keys[intval( $sock )] as $key ) { - $cmd .= ' ' . $key; - } - $cmd .= "\r\n"; - - if ( $this->_fwrite( $sock, $cmd ) ) { - $gather[] = $sock; - } - } - - // Parse responses - $val = array(); - foreach ( $gather as $sock ) { - $this->_load_items( $sock, $val, $casToken ); - } - - if ( $this->_debug ) { - foreach ( $val as $k => $v ) { - $this->_debugprint( sprintf( "MemCache: got %s", $k ) ); - } - } - - return $val; - } - - // }}} - // {{{ incr() - - /** - * Increments $key (optionally) by $amt - * - * @param string $key Key to increment - * @param int $amt (optional) amount to increment - * - * @return int|null Null if the key does not exist yet (this does NOT - * create new mappings if the key does not exist). If the key does - * exist, this returns the new value for that key. - */ - public function incr( $key, $amt = 1 ) { - return $this->_incrdecr( 'incr', $key, $amt ); - } - - // }}} - // {{{ replace() - - /** - * Overwrites an existing value for key; only works if key is already set - * - * @param string $key Key to set value as - * @param mixed $value Value to store - * @param int $exp (optional) Expiration time. This can be a number of seconds - * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or - * longer must be the timestamp of the time at which the mapping should expire. It - * is safe to use timestamps in all cases, regardless of exipration - * eg: strtotime("+3 hour") - * - * @return bool - */ - public function replace( $key, $value, $exp = 0 ) { - return $this->_set( 'replace', $key, $value, $exp ); - } - - // }}} - // {{{ run_command() - - /** - * Passes through $cmd to the memcache server connected by $sock; returns - * output as an array (null array if no output) - * - * @param Resource $sock Socket to send command on - * @param string $cmd Command to run - * - * @return array Output array - */ - public function run_command( $sock, $cmd ) { - if ( !is_resource( $sock ) ) { - return array(); - } - - if ( !$this->_fwrite( $sock, $cmd ) ) { - return array(); - } - - $ret = array(); - while ( true ) { - $res = $this->_fgets( $sock ); - $ret[] = $res; - if ( preg_match( '/^END/', $res ) ) { - break; - } - if ( strlen( $res ) == 0 ) { - break; - } - } - return $ret; - } - - // }}} - // {{{ set() - - /** - * Unconditionally sets a key to a given value in the memcache. Returns true - * if set successfully. - * - * @param string $key Key to set value as - * @param mixed $value Value to set - * @param int $exp (optional) Expiration time. This can be a number of seconds - * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or - * longer must be the timestamp of the time at which the mapping should expire. It - * is safe to use timestamps in all cases, regardless of exipration - * eg: strtotime("+3 hour") - * - * @return bool True on success - */ - public function set( $key, $value, $exp = 0 ) { - return $this->_set( 'set', $key, $value, $exp ); - } - - // }}} - // {{{ cas() - - /** - * Sets a key to a given value in the memcache if the current value still corresponds - * to a known, given value. Returns true if set successfully. - * - * @param float $casToken Current known value - * @param string $key Key to set value as - * @param mixed $value Value to set - * @param int $exp (optional) Expiration time. This can be a number of seconds - * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or - * longer must be the timestamp of the time at which the mapping should expire. It - * is safe to use timestamps in all cases, regardless of exipration - * eg: strtotime("+3 hour") - * - * @return bool True on success - */ - public function cas( $casToken, $key, $value, $exp = 0 ) { - return $this->_set( 'cas', $key, $value, $exp, $casToken ); - } - - // }}} - // {{{ set_compress_threshold() - - /** - * Set the compression threshold - * - * @param int $thresh Threshold to compress if larger than - */ - public function set_compress_threshold( $thresh ) { - $this->_compress_threshold = $thresh; - } - - // }}} - // {{{ set_debug() - - /** - * Set the debug flag - * - * @see __construct() - * @param bool $dbg True for debugging, false otherwise - */ - public function set_debug( $dbg ) { - $this->_debug = $dbg; - } - - // }}} - // {{{ set_servers() - - /** - * Set the server list to distribute key gets and puts between - * - * @see __construct() - * @param array $list Array of servers to connect to - */ - public function set_servers( $list ) { - $this->_servers = $list; - $this->_active = count( $list ); - $this->_buckets = null; - $this->_bucketcount = 0; - - $this->_single_sock = null; - if ( $this->_active == 1 ) { - $this->_single_sock = $this->_servers[0]; - } - } - - /** - * Sets the timeout for new connections - * - * @param int $seconds Number of seconds - * @param int $microseconds Number of microseconds - */ - public function set_timeout( $seconds, $microseconds ) { - $this->_timeout_seconds = $seconds; - $this->_timeout_microseconds = $microseconds; - } - - // }}} - // }}} - // {{{ private methods - // {{{ _close_sock() - - /** - * Close the specified socket - * - * @param string $sock Socket to close - * - * @access private - */ - function _close_sock( $sock ) { - $host = array_search( $sock, $this->_cache_sock ); - fclose( $this->_cache_sock[$host] ); - unset( $this->_cache_sock[$host] ); - } - - // }}} - // {{{ _connect_sock() - - /** - * Connects $sock to $host, timing out after $timeout - * - * @param int $sock Socket to connect - * @param string $host Host:IP to connect to - * - * @return bool - * @access private - */ - function _connect_sock( &$sock, $host ) { - list( $ip, $port ) = preg_split( '/:(?=\d)/', $host ); - $sock = false; - $timeout = $this->_connect_timeout; - $errno = $errstr = null; - for ( $i = 0; !$sock && $i < $this->_connect_attempts; $i++ ) { - Wikimedia\suppressWarnings(); - if ( $this->_persistent == 1 ) { - $sock = pfsockopen( $ip, $port, $errno, $errstr, $timeout ); - } else { - $sock = fsockopen( $ip, $port, $errno, $errstr, $timeout ); - } - Wikimedia\restoreWarnings(); - } - if ( !$sock ) { - $this->_error_log( "Error connecting to $host: $errstr" ); - $this->_dead_host( $host ); - return false; - } - - // Initialise timeout - stream_set_timeout( $sock, $this->_timeout_seconds, $this->_timeout_microseconds ); - - // If the connection was persistent, flush the read buffer in case there - // was a previous incomplete request on this connection - if ( $this->_persistent ) { - $this->_flush_read_buffer( $sock ); - } - return true; - } - - // }}} - // {{{ _dead_sock() - - /** - * Marks a host as dead until 30-40 seconds in the future - * - * @param string $sock Socket to mark as dead - * - * @access private - */ - function _dead_sock( $sock ) { - $host = array_search( $sock, $this->_cache_sock ); - $this->_dead_host( $host ); - } - - /** - * @param string $host - */ - function _dead_host( $host ) { - $ip = explode( ':', $host )[0]; - $this->_host_dead[$ip] = time() + 30 + intval( rand( 0, 10 ) ); - $this->_host_dead[$host] = $this->_host_dead[$ip]; - unset( $this->_cache_sock[$host] ); - } - - // }}} - // {{{ get_sock() - - /** - * get_sock - * - * @param string $key Key to retrieve value for; - * - * @return Resource|bool Resource on success, false on failure - * @access private - */ - function get_sock( $key ) { - if ( !$this->_active ) { - return false; - } - - if ( $this->_single_sock !== null ) { - return $this->sock_to_host( $this->_single_sock ); - } - - $hv = is_array( $key ) ? intval( $key[0] ) : $this->_hashfunc( $key ); - if ( $this->_buckets === null ) { - $bu = array(); - foreach ( $this->_servers as $v ) { - if ( is_array( $v ) ) { - for ( $i = 0; $i < $v[1]; $i++ ) { - $bu[] = $v[0]; - } - } else { - $bu[] = $v; - } - } - $this->_buckets = $bu; - $this->_bucketcount = count( $bu ); - } - - $realkey = is_array( $key ) ? $key[1] : $key; - for ( $tries = 0; $tries < 20; $tries++ ) { - $host = $this->_buckets[$hv % $this->_bucketcount]; - $sock = $this->sock_to_host( $host ); - if ( is_resource( $sock ) ) { - return $sock; - } - $hv = $this->_hashfunc( $hv . $realkey ); - } - - return false; - } - - // }}} - // {{{ _hashfunc() - - /** - * Creates a hash integer based on the $key - * - * @param string $key Key to hash - * - * @return int Hash value - * @access private - */ - function _hashfunc( $key ) { - # Hash function must be in [0,0x7ffffff] - # We take the first 31 bits of the MD5 hash, which unlike the hash - # function used in a previous version of this client, works - return hexdec( substr( md5( $key ), 0, 8 ) ) & 0x7fffffff; - } - - // }}} - // {{{ _incrdecr() - - /** - * Perform increment/decriment on $key - * - * @param string $cmd Command to perform - * @param string|array $key Key to perform it on - * @param int $amt Amount to adjust - * - * @return int New value of $key - * @access private - */ - function _incrdecr( $cmd, $key, $amt = 1 ) { - if ( !$this->_active ) { - return null; - } - - $sock = $this->get_sock( $key ); - if ( !is_resource( $sock ) ) { - return null; - } - - $key = is_array( $key ) ? $key[1] : $key; - if ( isset( $this->stats[$cmd] ) ) { - $this->stats[$cmd]++; - } else { - $this->stats[$cmd] = 1; - } - if ( !$this->_fwrite( $sock, "$cmd $key $amt\r\n" ) ) { - return null; - } - - $line = $this->_fgets( $sock ); - $match = array(); - if ( !preg_match( '/^(\d+)/', $line, $match ) ) { - return null; - } - return $match[1]; - } - - // }}} - // {{{ _load_items() - - /** - * Load items into $ret from $sock - * - * @param Resource $sock Socket to read from - * @param array $ret returned values - * @param float $casToken [optional] - * @return bool True for success, false for failure - * - * @access private - */ - function _load_items( $sock, &$ret, &$casToken = null ) { - $results = array(); - - while ( 1 ) { - $decl = $this->_fgets( $sock ); - - if ( $decl === false ) { - /* - * If nothing can be read, something is wrong because we know exactly when - * to stop reading (right after "END") and we return right after that. - */ - return false; - } elseif ( preg_match( '/^VALUE (\S+) (\d+) (\d+) (\d+)$/', $decl, $match ) ) { - /* - * Read all data returned. This can be either one or multiple values. - * Save all that data (in an array) to be processed later: we'll first - * want to continue reading until "END" before doing anything else, - * to make sure that we don't leave our client in a state where it's - * output is not yet fully read. - */ - $results[] = array( - $match[1], // rkey - $match[2], // flags - $match[3], // len - $match[4], // casToken - $this->_fread( $sock, $match[3] + 2 ), // data - ); - } elseif ( $decl == "END" ) { - if ( count( $results ) == 0 ) { - return false; - } - - /** - * All data has been read, time to process the data and build - * meaningful return values. - */ - foreach ( $results as $vars ) { - list( $rkey, $flags, $len, $casToken, $data ) = $vars; - - if ( $data === false || substr( $data, -2 ) !== "\r\n" ) { - $this->_handle_error( $sock, - 'line ending missing from data block from $1' ); - return false; - } - $data = substr( $data, 0, -2 ); - $ret[$rkey] = $data; - - if ( $this->_have_zlib && $flags & self::COMPRESSED ) { - $ret[$rkey] = gzuncompress( $ret[$rkey] ); - } - - /* - * This unserialize is the exact reason that we only want to - * process data after having read until "END" (instead of doing - * this right away): "unserialize" can trigger outside code: - * in the event that $ret[$rkey] is a serialized object, - * unserializing it will trigger __wakeup() if present. If that - * function attempted to read from memcached (while we did not - * yet read "END"), these 2 calls would collide. - */ - if ( $flags & self::SERIALIZED ) { - $ret[$rkey] = $this->unserialize( $ret[$rkey] ); - } elseif ( $flags & self::INTVAL ) { - $ret[$rkey] = intval( $ret[$rkey] ); - } - } - - return true; - } else { - $this->_handle_error( $sock, 'Error parsing response from $1' ); - return false; - } - } - } - - // }}} - // {{{ _set() - - /** - * Performs the requested storage operation to the memcache server - * - * @param string $cmd Command to perform - * @param string $key Key to act on - * @param mixed $val What we need to store - * @param int $exp (optional) Expiration time. This can be a number of seconds - * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or - * longer must be the timestamp of the time at which the mapping should expire. It - * is safe to use timestamps in all cases, regardless of exipration - * eg: strtotime("+3 hour") - * @param float $casToken [optional] - * - * @return bool - * @access private - */ - function _set( $cmd, $key, $val, $exp, $casToken = null ) { - if ( !$this->_active ) { - return false; - } - - $sock = $this->get_sock( $key ); - if ( !is_resource( $sock ) ) { - return false; - } - - if ( isset( $this->stats[$cmd] ) ) { - $this->stats[$cmd]++; - } else { - $this->stats[$cmd] = 1; - } - - $flags = 0; - - if ( is_int( $val ) ) { - $flags |= self::INTVAL; - } elseif ( !is_scalar( $val ) ) { - $val = $this->serialize( $val ); - $flags |= self::SERIALIZED; - if ( $this->_debug ) { - $this->_debugprint( sprintf( "client: serializing data as it is not scalar" ) ); - } - } - - $len = strlen( $val ); - - if ( $this->_have_zlib && $this->_compress_enable - && $this->_compress_threshold && $len >= $this->_compress_threshold - ) { - $c_val = gzcompress( $val, 9 ); - $c_len = strlen( $c_val ); - - if ( $c_len < $len * ( 1 - self::COMPRESSION_SAVINGS ) ) { - if ( $this->_debug ) { - $this->_debugprint( sprintf( "client: compressing data; was %d bytes is now %d bytes", $len, $c_len ) ); - } - $val = $c_val; - $len = $c_len; - $flags |= self::COMPRESSED; - } - } - - $command = "$cmd $key $flags $exp $len"; - if ( $casToken ) { - $command .= " $casToken"; - } - - if ( !$this->_fwrite( $sock, "$command\r\n$val\r\n" ) ) { - return false; - } - - $line = $this->_fgets( $sock ); - - if ( $this->_debug ) { - $this->_debugprint( sprintf( "%s %s (%s)", $cmd, $key, $line ) ); - } - if ( $line === "STORED" ) { - return true; - } elseif ( $line === "NOT_STORED" && $cmd === "set" ) { - // "Not stored" is always used as the mcrouter response with AllAsyncRoute - return true; - } - - return false; - } - - // }}} - // {{{ sock_to_host() - - /** - * Returns the socket for the host - * - * @param string $host Host:IP to get socket for - * - * @return Resource|bool IO Stream or false - * @access private - */ - function sock_to_host( $host ) { - if ( isset( $this->_cache_sock[$host] ) ) { - return $this->_cache_sock[$host]; - } - - $sock = null; - $now = time(); - list( $ip, /* $port */) = explode( ':', $host ); - if ( isset( $this->_host_dead[$host] ) && $this->_host_dead[$host] > $now || - isset( $this->_host_dead[$ip] ) && $this->_host_dead[$ip] > $now - ) { - return null; - } - - if ( !$this->_connect_sock( $sock, $host ) ) { - return null; - } - - // Do not buffer writes - stream_set_write_buffer( $sock, 0 ); - - $this->_cache_sock[$host] = $sock; - - return $this->_cache_sock[$host]; - } - - /** - * @param string $text - */ - function _debugprint( $text ) { - $this->_logger->debug( $text ); - } - - /** - * @param string $text - */ - function _error_log( $text ) { - $this->_logger->error( "Memcached error: $text" ); - } - - /** - * Write to a stream. If there is an error, mark the socket dead. - * - * @param Resource $sock The socket - * @param string $buf The string to write - * @return bool True on success, false on failure - */ - function _fwrite( $sock, $buf ) { - $bytesWritten = 0; - $bufSize = strlen( $buf ); - while ( $bytesWritten < $bufSize ) { - $result = fwrite( $sock, $buf ); - $data = stream_get_meta_data( $sock ); - if ( $data['timed_out'] ) { - $this->_handle_error( $sock, 'timeout writing to $1' ); - return false; - } - // Contrary to the documentation, fwrite() returns zero on error in PHP 5.3. - if ( $result === false || $result === 0 ) { - $this->_handle_error( $sock, 'error writing to $1' ); - return false; - } - $bytesWritten += $result; - } - - return true; - } - - /** - * Handle an I/O error. Mark the socket dead and log an error. - * - * @param Resource $sock - * @param string $msg - */ - function _handle_error( $sock, $msg ) { - $peer = stream_socket_get_name( $sock, true /** remote **/ ); - if ( strval( $peer ) === '' ) { - $peer = array_search( $sock, $this->_cache_sock ); - if ( $peer === false ) { - $peer = '[unknown host]'; - } - } - $msg = str_replace( '$1', $peer, $msg ); - $this->_error_log( "$msg" ); - $this->_dead_sock( $sock ); - } - - /** - * Read the specified number of bytes from a stream. If there is an error, - * mark the socket dead. - * - * @param Resource $sock The socket - * @param int $len The number of bytes to read - * @return string|bool The string on success, false on failure. - */ - function _fread( $sock, $len ) { - $buf = ''; - while ( $len > 0 ) { - $result = fread( $sock, $len ); - $data = stream_get_meta_data( $sock ); - if ( $data['timed_out'] ) { - $this->_handle_error( $sock, 'timeout reading from $1' ); - return false; - } - if ( $result === false ) { - $this->_handle_error( $sock, 'error reading buffer from $1' ); - return false; - } - if ( $result === '' ) { - // This will happen if the remote end of the socket is shut down - $this->_handle_error( $sock, 'unexpected end of file reading from $1' ); - return false; - } - $len -= strlen( $result ); - $buf .= $result; - } - return $buf; - } - - /** - * Read a line from a stream. If there is an error, mark the socket dead. - * The \r\n line ending is stripped from the response. - * - * @param Resource $sock The socket - * @return string|bool The string on success, false on failure - */ - function _fgets( $sock ) { - $result = fgets( $sock ); - // fgets() may return a partial line if there is a select timeout after - // a successful recv(), so we have to check for a timeout even if we - // got a string response. - $data = stream_get_meta_data( $sock ); - if ( $data['timed_out'] ) { - $this->_handle_error( $sock, 'timeout reading line from $1' ); - return false; - } - if ( $result === false ) { - $this->_handle_error( $sock, 'error reading line from $1' ); - return false; - } - if ( substr( $result, -2 ) === "\r\n" ) { - $result = substr( $result, 0, -2 ); - } elseif ( substr( $result, -1 ) === "\n" ) { - $result = substr( $result, 0, -1 ); - } else { - $this->_handle_error( $sock, 'line ending missing in response from $1' ); - return false; - } - return $result; - } - - /** - * Flush the read buffer of a stream - * @param Resource $f - */ - function _flush_read_buffer( $f ) { - if ( !is_resource( $f ) ) { - return; - } - $r = array( $f ); - $w = null; - $e = null; - $n = stream_select( $r, $w, $e, 0, 0 ); - while ( $n == 1 && !feof( $f ) ) { - fread( $f, 1024 ); - $r = array( $f ); - $w = null; - $e = null; - $n = stream_select( $r, $w, $e, 0, 0 ); - } - } - - // }}} - // }}} - // }}} -} - -// }}} diff --git a/includes/libs/objectcache/MemcachedPeclBagOStuff.php b/includes/libs/objectcache/MemcachedPeclBagOStuff.php index cc7ee2a5f5..9bf3f42126 100644 --- a/includes/libs/objectcache/MemcachedPeclBagOStuff.php +++ b/includes/libs/objectcache/MemcachedPeclBagOStuff.php @@ -214,7 +214,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff { : $this->checkResult( $key, $result ); } - protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { + protected function doCas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { $this->debug( "cas($key)" ); $result = $this->acquireSyncClient()->cas( @@ -238,7 +238,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff { : $this->checkResult( $key, $result ); } - public function add( $key, $value, $exptime = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) { $this->debug( "add($key)" ); $result = $this->acquireSyncClient()->add( @@ -250,7 +250,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff { return $this->checkResult( $key, $result ); } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { $this->debug( "incr($key)" ); $result = $this->acquireSyncClient()->increment( $key, $value ); @@ -258,7 +258,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff { return $this->checkResult( $key, $result ); } - public function decr( $key, $value = 1 ) { + public function decr( $key, $value = 1, $flags = 0 ) { $this->debug( "decr($key)" ); $result = $this->acquireSyncClient()->decrement( $key, $value ); @@ -332,7 +332,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff { // The PECL implementation is a naïve for-loop so use async I/O to pipeline; // https://github.com/php-memcached-dev/php-memcached/blob/master/php_memcached.c#L1852 - if ( ( $flags & self::WRITE_BACKGROUND ) == self::WRITE_BACKGROUND ) { + if ( $this->fieldHasFlags( $flags, self::WRITE_BACKGROUND ) ) { $client = $this->acquireAsyncClient(); $result = $client->setMulti( $data, $exptime ); $this->releaseAsyncClient( $client ); @@ -352,7 +352,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff { // The PECL implementation is a naïve for-loop so use async I/O to pipeline; // https://github.com/php-memcached-dev/php-memcached/blob/7443d16d02fb73cdba2e90ae282446f80969229c/php_memcached.c#L1852 - if ( ( $flags & self::WRITE_BACKGROUND ) == self::WRITE_BACKGROUND ) { + if ( $this->fieldHasFlags( $flags, self::WRITE_BACKGROUND ) ) { $client = $this->acquireAsyncClient(); $resultArray = $client->deleteMulti( $keys ) ?: []; $this->releaseAsyncClient( $client ); diff --git a/includes/libs/objectcache/MemcachedPhpBagOStuff.php b/includes/libs/objectcache/MemcachedPhpBagOStuff.php index b1d5d29f16..fc6deefd93 100644 --- a/includes/libs/objectcache/MemcachedPhpBagOStuff.php +++ b/includes/libs/objectcache/MemcachedPhpBagOStuff.php @@ -76,7 +76,7 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff { return $this->client->delete( $this->validateKeyEncoding( $key ) ); } - public function add( $key, $value, $exptime = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) { return $this->client->add( $this->validateKeyEncoding( $key ), $value, @@ -84,7 +84,7 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff { ); } - protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { + protected function doCas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { return $this->client->cas( $casToken, $this->validateKeyEncoding( $key ), @@ -93,13 +93,13 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff { ); } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { $n = $this->client->incr( $this->validateKeyEncoding( $key ), $value ); return ( $n !== false && $n !== null ) ? $n : false; } - public function decr( $key, $value = 1 ) { + public function decr( $key, $value = 1, $flags = 0 ) { $n = $this->client->decr( $this->validateKeyEncoding( $key ), $value ); return ( $n !== false && $n !== null ) ? $n : false; diff --git a/includes/libs/objectcache/MultiWriteBagOStuff.php b/includes/libs/objectcache/MultiWriteBagOStuff.php index d150880750..d0aa380bf6 100644 --- a/includes/libs/objectcache/MultiWriteBagOStuff.php +++ b/includes/libs/objectcache/MultiWriteBagOStuff.php @@ -106,7 +106,7 @@ class MultiWriteBagOStuff extends BagOStuff { } public function get( $key, $flags = 0 ) { - if ( ( $flags & self::READ_LATEST ) == self::READ_LATEST ) { + if ( $this->fieldHasFlags( $flags, self::READ_LATEST ) ) { // If the latest write was a delete(), we do NOT want to fallback // to the other tiers and possibly see the old value. Also, this // is used by merge(), which only needs to hit the primary. @@ -123,9 +123,10 @@ class MultiWriteBagOStuff extends BagOStuff { $missIndexes[] = $i; } - if ( $value !== false - && $missIndexes - && ( $flags & self::READ_VERIFIED ) == self::READ_VERIFIED + if ( + $value !== false && + $this->fieldHasFlags( $flags, self::READ_VERIFIED ) && + $missIndexes ) { // Backfill the value to the higher (and often faster/smaller) cache tiers $this->doWrite( @@ -265,7 +266,7 @@ class MultiWriteBagOStuff extends BagOStuff { ); } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { return $this->doWrite( $this->cacheIndexes, $this->asyncWrites, @@ -274,7 +275,7 @@ class MultiWriteBagOStuff extends BagOStuff { ); } - public function decr( $key, $value = 1 ) { + public function decr( $key, $value = 1, $flags = 0 ) { return $this->doWrite( $this->cacheIndexes, $this->asyncWrites, @@ -283,7 +284,7 @@ class MultiWriteBagOStuff extends BagOStuff { ); } - public function incrWithInit( $key, $ttl, $value = 1, $init = 1 ) { + public function incrWithInit( $key, $exptime, $value = 1, $init = null, $flags = 0 ) { return $this->doWrite( $this->cacheIndexes, $this->asyncWrites, @@ -346,7 +347,7 @@ class MultiWriteBagOStuff extends BagOStuff { * @return bool */ protected function usesAsyncWritesGivenFlags( $flags ) { - return ( ( $flags & self::WRITE_SYNC ) == self::WRITE_SYNC ) ? false : $this->asyncWrites; + return $this->fieldHasFlags( $flags, self::WRITE_SYNC ) ? false : $this->asyncWrites; } public function makeKeyInternal( $keyspace, $args ) { diff --git a/includes/libs/objectcache/RESTBagOStuff.php b/includes/libs/objectcache/RESTBagOStuff.php index aa4a9b31fc..82b5ac05bf 100644 --- a/includes/libs/objectcache/RESTBagOStuff.php +++ b/includes/libs/objectcache/RESTBagOStuff.php @@ -164,7 +164,7 @@ class RESTBagOStuff extends MediumSpecificBagOStuff { return $this->handleError( "Failed to store $key", $rcode, $rerr, $rhdrs, $rbody ); } - public function add( $key, $value, $exptime = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) { // @TODO: make this atomic if ( $this->get( $key ) === false ) { return $this->set( $key, $value, $exptime, $flags ); @@ -188,11 +188,11 @@ class RESTBagOStuff extends MediumSpecificBagOStuff { return $this->handleError( "Failed to delete $key", $rcode, $rerr, $rhdrs, $rbody ); } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { // @TODO: make this atomic $n = $this->get( $key, self::READ_LATEST ); if ( $this->isInteger( $n ) ) { // key exists? - $n = max( $n + intval( $value ), 0 ); + $n = max( $n + (int)$value, 0 ); // @TODO: respect $exptime return $this->set( $key, $n ) ? $n : false; } @@ -200,6 +200,10 @@ class RESTBagOStuff extends MediumSpecificBagOStuff { return false; } + public function decr( $key, $value = 1, $flags = 0 ) { + return $this->incr( $key, -$value, $flags ); + } + /** * Processes the response body. * diff --git a/includes/libs/objectcache/RedisBagOStuff.php b/includes/libs/objectcache/RedisBagOStuff.php index f75d3a1015..57a2507b7e 100644 --- a/includes/libs/objectcache/RedisBagOStuff.php +++ b/includes/libs/objectcache/RedisBagOStuff.php @@ -341,7 +341,7 @@ class RedisBagOStuff extends MediumSpecificBagOStuff { return $result; } - public function add( $key, $value, $expiry = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $expiry = 0, $flags = 0 ) { $conn = $this->getConnection( $key ); if ( !$conn ) { return false; @@ -364,7 +364,7 @@ class RedisBagOStuff extends MediumSpecificBagOStuff { return $result; } - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { $conn = $this->getConnection( $key ); if ( !$conn ) { return false; @@ -386,6 +386,28 @@ class RedisBagOStuff extends MediumSpecificBagOStuff { return $result; } + public function decr( $key, $value = 1, $flags = 0 ) { + $conn = $this->getConnection( $key ); + if ( !$conn ) { + return false; + } + + try { + if ( !$conn->exists( $key ) ) { + return false; + } + // @FIXME: on races, the key may have a 0 TTL + $result = $conn->decrBy( $key, $value ); + } catch ( RedisException $e ) { + $result = false; + $this->handleException( $conn, $e ); + } + + $this->logRequest( 'decr', $key, $conn->getServer(), $result ); + + return $result; + } + protected function doChangeTTL( $key, $exptime, $flags ) { $conn = $this->getConnection( $key ); if ( !$conn ) { diff --git a/includes/libs/objectcache/ReplicatedBagOStuff.php b/includes/libs/objectcache/ReplicatedBagOStuff.php index 504d51534e..0b5ac46f6a 100644 --- a/includes/libs/objectcache/ReplicatedBagOStuff.php +++ b/includes/libs/objectcache/ReplicatedBagOStuff.php @@ -76,7 +76,7 @@ class ReplicatedBagOStuff extends BagOStuff { } public function get( $key, $flags = 0 ) { - return ( ( $flags & self::READ_LATEST ) == self::READ_LATEST ) + return $this->fieldHasFlags( $flags, self::READ_LATEST ) ? $this->writeStore->get( $key, $flags ) : $this->readStore->get( $key, $flags ); } @@ -118,7 +118,7 @@ class ReplicatedBagOStuff extends BagOStuff { } public function getMulti( array $keys, $flags = 0 ) { - return ( ( $flags & self::READ_LATEST ) == self::READ_LATEST ) + return $this->fieldHasFlags( $flags, self::READ_LATEST ) ? $this->writeStore->getMulti( $keys, $flags ) : $this->readStore->getMulti( $keys, $flags ); } @@ -135,16 +135,16 @@ class ReplicatedBagOStuff extends BagOStuff { return $this->writeStore->changeTTLMulti( $keys, $exptime, $flags ); } - public function incr( $key, $value = 1 ) { - return $this->writeStore->incr( $key, $value ); + public function incr( $key, $value = 1, $flags = 0 ) { + return $this->writeStore->incr( $key, $value, $flags ); } - public function decr( $key, $value = 1 ) { - return $this->writeStore->decr( $key, $value ); + public function decr( $key, $value = 1, $flags = 0 ) { + return $this->writeStore->decr( $key, $value, $flags ); } - public function incrWithInit( $key, $ttl, $value = 1, $init = 1 ) { - return $this->writeStore->incrWithInit( $key, $ttl, $value, $init ); + public function incrWithInit( $key, $exptime, $value = 1, $init = null, $flags = 0 ) { + return $this->writeStore->incrWithInit( $key, $exptime, $value, $init, $flags ); } public function getLastError() { diff --git a/includes/libs/objectcache/WinCacheBagOStuff.php b/includes/libs/objectcache/WinCacheBagOStuff.php index 0e4e3fb63d..5b38628403 100644 --- a/includes/libs/objectcache/WinCacheBagOStuff.php +++ b/includes/libs/objectcache/WinCacheBagOStuff.php @@ -28,6 +28,11 @@ * @ingroup Cache */ class WinCacheBagOStuff extends MediumSpecificBagOStuff { + public function __construct( array $params = [] ) { + $params['segmentationSize'] = $params['segmentationSize'] ?? INF; + parent::__construct( $params ); + } + protected function doGet( $key, $flags = 0, &$casToken = null ) { $casToken = null; @@ -44,7 +49,7 @@ class WinCacheBagOStuff extends MediumSpecificBagOStuff { return $value; } - protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { + protected function doCas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { if ( !wincache_lock( $key ) ) { // optimize with FIFO lock return false; } @@ -76,7 +81,7 @@ class WinCacheBagOStuff extends MediumSpecificBagOStuff { return ( $result === [] || $result === true ); } - public function add( $key, $value, $exptime = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) { if ( wincache_ucache_exists( $key ) ) { return false; // avoid warnings } @@ -95,14 +100,6 @@ class WinCacheBagOStuff extends MediumSpecificBagOStuff { return true; } - /** - * Construct a cache key. - * - * @since 1.27 - * @param string $keyspace - * @param array $args - * @return string - */ public function makeKeyInternal( $keyspace, $args ) { // WinCache keys have a maximum length of 150 characters. From that, // subtract the number of characters we need for the keyspace and for @@ -131,13 +128,7 @@ class WinCacheBagOStuff extends MediumSpecificBagOStuff { return $keyspace . ':' . implode( ':', $args ); } - /** - * Increase stored value of $key by $value while preserving its original TTL - * @param string $key Key to increase - * @param int $value Value to add to $key (Default 1) - * @return int|bool New value or false on failure - */ - public function incr( $key, $value = 1 ) { + public function incr( $key, $value = 1, $flags = 0 ) { if ( !wincache_lock( $key ) ) { // optimize with FIFO lock return false; } @@ -155,4 +146,8 @@ class WinCacheBagOStuff extends MediumSpecificBagOStuff { return $n; } + + public function decr( $key, $value = 1, $flags = 0 ) { + return $this->incr( $key, -$value, $flags ); + } } diff --git a/includes/libs/objectcache/utils/MemcachedClient.php b/includes/libs/objectcache/utils/MemcachedClient.php new file mode 100644 index 0000000000..2c4085433e --- /dev/null +++ b/includes/libs/objectcache/utils/MemcachedClient.php @@ -0,0 +1,1311 @@ + | + * | All rights reserved. | + * | | + * | Redistribution and use in source and binary forms, with or without | + * | modification, are permitted provided that the following conditions | + * | are met: | + * | | + * | 1. Redistributions of source code must retain the above copyright | + * | notice, this list of conditions and the following disclaimer. | + * | 2. Redistributions in binary form must reproduce the above copyright | + * | notice, this list of conditions and the following disclaimer in the | + * | documentation and/or other materials provided with the distribution. | + * | | + * | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | + * | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | + * | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | + * | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | + * | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | + * | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | + * | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | + * | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | + * | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | + * | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | + * +---------------------------------------------------------------------------+ + * | Author: Ryan T. Dean | + * | Heavily influenced by the Perl memcached client by Brad Fitzpatrick. | + * | Permission granted by Brad Fitzpatrick for relicense of ported Perl | + * | client logic under 2-clause BSD license. | + * +---------------------------------------------------------------------------+ + * + * @file + * $TCAnet$ + */ + +/** + * This is a PHP client for memcached - a distributed memory cache daemon. + * + * More information is available at http://www.danga.com/memcached/ + * + * Usage example: + * + * $mc = new MemcachedClient(array( + * 'servers' => array( + * '127.0.0.1:10000', + * array( '192.0.0.1:10010', 2 ), + * '127.0.0.1:10020' + * ), + * 'debug' => false, + * 'compress_threshold' => 10240, + * 'persistent' => true + * )); + * + * $mc->add( 'key', array( 'some', 'array' ) ); + * $mc->replace( 'key', 'some random string' ); + * $val = $mc->get( 'key' ); + * + * @author Ryan T. Dean + * @version 0.1.2 + */ + +use Psr\Log\LoggerInterface; +use Psr\Log\NullLogger; + +// {{{ class MemcachedClient +/** + * memcached client class implemented using (p)fsockopen() + * + * @author Ryan T. Dean + * @ingroup Cache + */ +class MemcachedClient { + // {{{ properties + // {{{ public + + // {{{ constants + // {{{ flags + + /** + * Flag: indicates data is serialized + */ + const SERIALIZED = 1; + + /** + * Flag: indicates data is compressed + */ + const COMPRESSED = 2; + + /** + * Flag: indicates data is an integer + */ + const INTVAL = 4; + + // }}} + + /** + * Minimum savings to store data compressed + */ + const COMPRESSION_SAVINGS = 0.20; + + // }}} + + /** + * Command statistics + * + * @var array + * @access public + */ + public $stats; + + // }}} + // {{{ private + + /** + * Cached Sockets that are connected + * + * @var array + * @access private + */ + public $_cache_sock; + + /** + * Current debug status; 0 - none to 9 - profiling + * + * @var bool + * @access private + */ + public $_debug; + + /** + * Dead hosts, assoc array, 'host'=>'unixtime when ok to check again' + * + * @var array + * @access private + */ + public $_host_dead; + + /** + * Is compression available? + * + * @var bool + * @access private + */ + public $_have_zlib; + + /** + * Do we want to use compression? + * + * @var bool + * @access private + */ + public $_compress_enable; + + /** + * At how many bytes should we compress? + * + * @var int + * @access private + */ + public $_compress_threshold; + + /** + * Are we using persistent links? + * + * @var bool + * @access private + */ + public $_persistent; + + /** + * If only using one server; contains ip:port to connect to + * + * @var string + * @access private + */ + public $_single_sock; + + /** + * Array containing ip:port or array(ip:port, weight) + * + * @var array + * @access private + */ + public $_servers; + + /** + * Our bit buckets + * + * @var array + * @access private + */ + public $_buckets; + + /** + * Total # of bit buckets we have + * + * @var int + * @access private + */ + public $_bucketcount; + + /** + * # of total servers we have + * + * @var int + * @access private + */ + public $_active; + + /** + * Stream timeout in seconds. Applies for example to fread() + * + * @var int + * @access private + */ + public $_timeout_seconds; + + /** + * Stream timeout in microseconds + * + * @var int + * @access private + */ + public $_timeout_microseconds; + + /** + * Connect timeout in seconds + */ + public $_connect_timeout; + + /** + * Number of connection attempts for each server + */ + public $_connect_attempts; + + /** + * @var LoggerInterface + */ + private $_logger; + + // }}} + // }}} + // {{{ methods + // {{{ public functions + // {{{ memcached() + + /** + * Memcache initializer + * + * @param array $args Associative array of settings + */ + public function __construct( $args ) { + $this->set_servers( $args['servers'] ?? array() ); + $this->_debug = $args['debug'] ?? false; + $this->stats = array(); + $this->_compress_threshold = $args['compress_threshold'] ?? 0; + $this->_persistent = $args['persistent'] ?? false; + $this->_compress_enable = true; + $this->_have_zlib = function_exists( 'gzcompress' ); + + $this->_cache_sock = array(); + $this->_host_dead = array(); + + $this->_timeout_seconds = 0; + $this->_timeout_microseconds = $args['timeout'] ?? 500000; + + $this->_connect_timeout = $args['connect_timeout'] ?? 0.1; + $this->_connect_attempts = 2; + + $this->_logger = $args['logger'] ?? new NullLogger(); + } + + // }}} + + /** + * @param mixed $value + * @return string|integer + */ + public function serialize( $value ) { + return serialize( $value ); + } + + /** + * @param string $value + * @return mixed + */ + public function unserialize( $value ) { + return unserialize( $value ); + } + + // {{{ add() + + /** + * Adds a key/value to the memcache server if one isn't already set with + * that key + * + * @param string $key Key to set with data + * @param mixed $val Value to store + * @param int $exp (optional) Expiration time. This can be a number of seconds + * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or + * longer must be the timestamp of the time at which the mapping should expire. It + * is safe to use timestamps in all cases, regardless of expiration + * eg: strtotime("+3 hour") + * + * @return bool + */ + public function add( $key, $val, $exp = 0 ) { + return $this->_set( 'add', $key, $val, $exp ); + } + + // }}} + // {{{ decr() + + /** + * Decrease a value stored on the memcache server + * + * @param string $key Key to decrease + * @param int $amt (optional) amount to decrease + * + * @return mixed False on failure, value on success + */ + public function decr( $key, $amt = 1 ) { + return $this->_incrdecr( 'decr', $key, $amt ); + } + + // }}} + // {{{ delete() + + /** + * Deletes a key from the server, optionally after $time + * + * @param string $key Key to delete + * @param int $time (optional) how long to wait before deleting + * + * @return bool True on success, false on failure + */ + public function delete( $key, $time = 0 ) { + if ( !$this->_active ) { + return false; + } + + $sock = $this->get_sock( $key ); + if ( !is_resource( $sock ) ) { + return false; + } + + $key = is_array( $key ) ? $key[1] : $key; + + if ( isset( $this->stats['delete'] ) ) { + $this->stats['delete']++; + } else { + $this->stats['delete'] = 1; + } + $cmd = "delete $key $time\r\n"; + if ( !$this->_fwrite( $sock, $cmd ) ) { + return false; + } + $res = $this->_fgets( $sock ); + + if ( $this->_debug ) { + $this->_debugprint( sprintf( "MemCache: delete %s (%s)", $key, $res ) ); + } + + if ( $res == "DELETED" || $res == "NOT_FOUND" ) { + return true; + } + + return false; + } + + /** + * Changes the TTL on a key from the server to $time + * + * @param string $key + * @param int $time TTL in seconds + * + * @return bool True on success, false on failure + */ + public function touch( $key, $time = 0 ) { + if ( !$this->_active ) { + return false; + } + + $sock = $this->get_sock( $key ); + if ( !is_resource( $sock ) ) { + return false; + } + + $key = is_array( $key ) ? $key[1] : $key; + + if ( isset( $this->stats['touch'] ) ) { + $this->stats['touch']++; + } else { + $this->stats['touch'] = 1; + } + $cmd = "touch $key $time\r\n"; + if ( !$this->_fwrite( $sock, $cmd ) ) { + return false; + } + $res = $this->_fgets( $sock ); + + if ( $this->_debug ) { + $this->_debugprint( sprintf( "MemCache: touch %s (%s)", $key, $res ) ); + } + + if ( $res == "TOUCHED" ) { + return true; + } + + return false; + } + + // }}} + // {{{ disconnect_all() + + /** + * Disconnects all connected sockets + */ + public function disconnect_all() { + foreach ( $this->_cache_sock as $sock ) { + fclose( $sock ); + } + + $this->_cache_sock = array(); + } + + // }}} + // {{{ enable_compress() + + /** + * Enable / Disable compression + * + * @param bool $enable True to enable, false to disable + */ + public function enable_compress( $enable ) { + $this->_compress_enable = $enable; + } + + // }}} + // {{{ forget_dead_hosts() + + /** + * Forget about all of the dead hosts + */ + public function forget_dead_hosts() { + $this->_host_dead = array(); + } + + // }}} + // {{{ get() + + /** + * Retrieves the value associated with the key from the memcache server + * + * @param array|string $key key to retrieve + * @param float $casToken [optional] + * + * @return mixed + */ + public function get( $key, &$casToken = null ) { + if ( $this->_debug ) { + $this->_debugprint( "get($key)" ); + } + + if ( !is_array( $key ) && strval( $key ) === '' ) { + $this->_debugprint( "Skipping key which equals to an empty string" ); + return false; + } + + if ( !$this->_active ) { + return false; + } + + $sock = $this->get_sock( $key ); + + if ( !is_resource( $sock ) ) { + return false; + } + + $key = is_array( $key ) ? $key[1] : $key; + if ( isset( $this->stats['get'] ) ) { + $this->stats['get']++; + } else { + $this->stats['get'] = 1; + } + + $cmd = "gets $key\r\n"; + if ( !$this->_fwrite( $sock, $cmd ) ) { + return false; + } + + $val = array(); + $this->_load_items( $sock, $val, $casToken ); + + if ( $this->_debug ) { + foreach ( $val as $k => $v ) { + $this->_debugprint( + sprintf( "MemCache: sock %s got %s", $this->serialize( $sock ), $k ) ); + } + } + + $value = false; + if ( isset( $val[$key] ) ) { + $value = $val[$key]; + } + return $value; + } + + // }}} + // {{{ get_multi() + + /** + * Get multiple keys from the server(s) + * + * @param array $keys Keys to retrieve + * + * @return array + */ + public function get_multi( $keys ) { + if ( !$this->_active ) { + return array(); + } + + if ( isset( $this->stats['get_multi'] ) ) { + $this->stats['get_multi']++; + } else { + $this->stats['get_multi'] = 1; + } + $sock_keys = array(); + $socks = array(); + foreach ( $keys as $key ) { + $sock = $this->get_sock( $key ); + if ( !is_resource( $sock ) ) { + continue; + } + $key = is_array( $key ) ? $key[1] : $key; + if ( !isset( $sock_keys[$sock] ) ) { + $sock_keys[intval( $sock )] = array(); + $socks[] = $sock; + } + $sock_keys[intval( $sock )][] = $key; + } + + $gather = array(); + // Send out the requests + foreach ( $socks as $sock ) { + $cmd = 'gets'; + foreach ( $sock_keys[intval( $sock )] as $key ) { + $cmd .= ' ' . $key; + } + $cmd .= "\r\n"; + + if ( $this->_fwrite( $sock, $cmd ) ) { + $gather[] = $sock; + } + } + + // Parse responses + $val = array(); + foreach ( $gather as $sock ) { + $this->_load_items( $sock, $val, $casToken ); + } + + if ( $this->_debug ) { + foreach ( $val as $k => $v ) { + $this->_debugprint( sprintf( "MemCache: got %s", $k ) ); + } + } + + return $val; + } + + // }}} + // {{{ incr() + + /** + * Increments $key (optionally) by $amt + * + * @param string $key Key to increment + * @param int $amt (optional) amount to increment + * + * @return int|null Null if the key does not exist yet (this does NOT + * create new mappings if the key does not exist). If the key does + * exist, this returns the new value for that key. + */ + public function incr( $key, $amt = 1 ) { + return $this->_incrdecr( 'incr', $key, $amt ); + } + + // }}} + // {{{ replace() + + /** + * Overwrites an existing value for key; only works if key is already set + * + * @param string $key Key to set value as + * @param mixed $value Value to store + * @param int $exp (optional) Expiration time. This can be a number of seconds + * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or + * longer must be the timestamp of the time at which the mapping should expire. It + * is safe to use timestamps in all cases, regardless of exipration + * eg: strtotime("+3 hour") + * + * @return bool + */ + public function replace( $key, $value, $exp = 0 ) { + return $this->_set( 'replace', $key, $value, $exp ); + } + + // }}} + // {{{ run_command() + + /** + * Passes through $cmd to the memcache server connected by $sock; returns + * output as an array (null array if no output) + * + * @param Resource $sock Socket to send command on + * @param string $cmd Command to run + * + * @return array Output array + */ + public function run_command( $sock, $cmd ) { + if ( !is_resource( $sock ) ) { + return array(); + } + + if ( !$this->_fwrite( $sock, $cmd ) ) { + return array(); + } + + $ret = array(); + while ( true ) { + $res = $this->_fgets( $sock ); + $ret[] = $res; + if ( preg_match( '/^END/', $res ) ) { + break; + } + if ( strlen( $res ) == 0 ) { + break; + } + } + return $ret; + } + + // }}} + // {{{ set() + + /** + * Unconditionally sets a key to a given value in the memcache. Returns true + * if set successfully. + * + * @param string $key Key to set value as + * @param mixed $value Value to set + * @param int $exp (optional) Expiration time. This can be a number of seconds + * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or + * longer must be the timestamp of the time at which the mapping should expire. It + * is safe to use timestamps in all cases, regardless of exipration + * eg: strtotime("+3 hour") + * + * @return bool True on success + */ + public function set( $key, $value, $exp = 0 ) { + return $this->_set( 'set', $key, $value, $exp ); + } + + // }}} + // {{{ cas() + + /** + * Sets a key to a given value in the memcache if the current value still corresponds + * to a known, given value. Returns true if set successfully. + * + * @param float $casToken Current known value + * @param string $key Key to set value as + * @param mixed $value Value to set + * @param int $exp (optional) Expiration time. This can be a number of seconds + * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or + * longer must be the timestamp of the time at which the mapping should expire. It + * is safe to use timestamps in all cases, regardless of exipration + * eg: strtotime("+3 hour") + * + * @return bool True on success + */ + public function cas( $casToken, $key, $value, $exp = 0 ) { + return $this->_set( 'cas', $key, $value, $exp, $casToken ); + } + + // }}} + // {{{ set_compress_threshold() + + /** + * Set the compression threshold + * + * @param int $thresh Threshold to compress if larger than + */ + public function set_compress_threshold( $thresh ) { + $this->_compress_threshold = $thresh; + } + + // }}} + // {{{ set_debug() + + /** + * Set the debug flag + * + * @see __construct() + * @param bool $dbg True for debugging, false otherwise + */ + public function set_debug( $dbg ) { + $this->_debug = $dbg; + } + + // }}} + // {{{ set_servers() + + /** + * Set the server list to distribute key gets and puts between + * + * @see __construct() + * @param array $list Array of servers to connect to + */ + public function set_servers( $list ) { + $this->_servers = $list; + $this->_active = count( $list ); + $this->_buckets = null; + $this->_bucketcount = 0; + + $this->_single_sock = null; + if ( $this->_active == 1 ) { + $this->_single_sock = $this->_servers[0]; + } + } + + /** + * Sets the timeout for new connections + * + * @param int $seconds Number of seconds + * @param int $microseconds Number of microseconds + */ + public function set_timeout( $seconds, $microseconds ) { + $this->_timeout_seconds = $seconds; + $this->_timeout_microseconds = $microseconds; + } + + // }}} + // }}} + // {{{ private methods + // {{{ _close_sock() + + /** + * Close the specified socket + * + * @param string $sock Socket to close + * + * @access private + */ + function _close_sock( $sock ) { + $host = array_search( $sock, $this->_cache_sock ); + fclose( $this->_cache_sock[$host] ); + unset( $this->_cache_sock[$host] ); + } + + // }}} + // {{{ _connect_sock() + + /** + * Connects $sock to $host, timing out after $timeout + * + * @param int $sock Socket to connect + * @param string $host Host:IP to connect to + * + * @return bool + * @access private + */ + function _connect_sock( &$sock, $host ) { + list( $ip, $port ) = preg_split( '/:(?=\d)/', $host ); + $sock = false; + $timeout = $this->_connect_timeout; + $errno = $errstr = null; + for ( $i = 0; !$sock && $i < $this->_connect_attempts; $i++ ) { + Wikimedia\suppressWarnings(); + if ( $this->_persistent == 1 ) { + $sock = pfsockopen( $ip, $port, $errno, $errstr, $timeout ); + } else { + $sock = fsockopen( $ip, $port, $errno, $errstr, $timeout ); + } + Wikimedia\restoreWarnings(); + } + if ( !$sock ) { + $this->_error_log( "Error connecting to $host: $errstr" ); + $this->_dead_host( $host ); + return false; + } + + // Initialise timeout + stream_set_timeout( $sock, $this->_timeout_seconds, $this->_timeout_microseconds ); + + // If the connection was persistent, flush the read buffer in case there + // was a previous incomplete request on this connection + if ( $this->_persistent ) { + $this->_flush_read_buffer( $sock ); + } + return true; + } + + // }}} + // {{{ _dead_sock() + + /** + * Marks a host as dead until 30-40 seconds in the future + * + * @param string $sock Socket to mark as dead + * + * @access private + */ + function _dead_sock( $sock ) { + $host = array_search( $sock, $this->_cache_sock ); + $this->_dead_host( $host ); + } + + /** + * @param string $host + */ + function _dead_host( $host ) { + $ip = explode( ':', $host )[0]; + $this->_host_dead[$ip] = time() + 30 + intval( rand( 0, 10 ) ); + $this->_host_dead[$host] = $this->_host_dead[$ip]; + unset( $this->_cache_sock[$host] ); + } + + // }}} + // {{{ get_sock() + + /** + * get_sock + * + * @param string $key Key to retrieve value for; + * + * @return Resource|bool Resource on success, false on failure + * @access private + */ + function get_sock( $key ) { + if ( !$this->_active ) { + return false; + } + + if ( $this->_single_sock !== null ) { + return $this->sock_to_host( $this->_single_sock ); + } + + $hv = is_array( $key ) ? intval( $key[0] ) : $this->_hashfunc( $key ); + if ( $this->_buckets === null ) { + $bu = array(); + foreach ( $this->_servers as $v ) { + if ( is_array( $v ) ) { + for ( $i = 0; $i < $v[1]; $i++ ) { + $bu[] = $v[0]; + } + } else { + $bu[] = $v; + } + } + $this->_buckets = $bu; + $this->_bucketcount = count( $bu ); + } + + $realkey = is_array( $key ) ? $key[1] : $key; + for ( $tries = 0; $tries < 20; $tries++ ) { + $host = $this->_buckets[$hv % $this->_bucketcount]; + $sock = $this->sock_to_host( $host ); + if ( is_resource( $sock ) ) { + return $sock; + } + $hv = $this->_hashfunc( $hv . $realkey ); + } + + return false; + } + + // }}} + // {{{ _hashfunc() + + /** + * Creates a hash integer based on the $key + * + * @param string $key Key to hash + * + * @return int Hash value + * @access private + */ + function _hashfunc( $key ) { + # Hash function must be in [0,0x7ffffff] + # We take the first 31 bits of the MD5 hash, which unlike the hash + # function used in a previous version of this client, works + return hexdec( substr( md5( $key ), 0, 8 ) ) & 0x7fffffff; + } + + // }}} + // {{{ _incrdecr() + + /** + * Perform increment/decriment on $key + * + * @param string $cmd Command to perform + * @param string|array $key Key to perform it on + * @param int $amt Amount to adjust + * + * @return int New value of $key + * @access private + */ + function _incrdecr( $cmd, $key, $amt = 1 ) { + if ( !$this->_active ) { + return null; + } + + $sock = $this->get_sock( $key ); + if ( !is_resource( $sock ) ) { + return null; + } + + $key = is_array( $key ) ? $key[1] : $key; + if ( isset( $this->stats[$cmd] ) ) { + $this->stats[$cmd]++; + } else { + $this->stats[$cmd] = 1; + } + if ( !$this->_fwrite( $sock, "$cmd $key $amt\r\n" ) ) { + return null; + } + + $line = $this->_fgets( $sock ); + $match = array(); + if ( !preg_match( '/^(\d+)/', $line, $match ) ) { + return null; + } + return $match[1]; + } + + // }}} + // {{{ _load_items() + + /** + * Load items into $ret from $sock + * + * @param Resource $sock Socket to read from + * @param array $ret returned values + * @param float $casToken [optional] + * @return bool True for success, false for failure + * + * @access private + */ + function _load_items( $sock, &$ret, &$casToken = null ) { + $results = array(); + + while ( 1 ) { + $decl = $this->_fgets( $sock ); + + if ( $decl === false ) { + /* + * If nothing can be read, something is wrong because we know exactly when + * to stop reading (right after "END") and we return right after that. + */ + return false; + } elseif ( preg_match( '/^VALUE (\S+) (\d+) (\d+) (\d+)$/', $decl, $match ) ) { + /* + * Read all data returned. This can be either one or multiple values. + * Save all that data (in an array) to be processed later: we'll first + * want to continue reading until "END" before doing anything else, + * to make sure that we don't leave our client in a state where it's + * output is not yet fully read. + */ + $results[] = array( + $match[1], // rkey + $match[2], // flags + $match[3], // len + $match[4], // casToken + $this->_fread( $sock, $match[3] + 2 ), // data + ); + } elseif ( $decl == "END" ) { + if ( count( $results ) == 0 ) { + return false; + } + + /** + * All data has been read, time to process the data and build + * meaningful return values. + */ + foreach ( $results as $vars ) { + list( $rkey, $flags, $len, $casToken, $data ) = $vars; + + if ( $data === false || substr( $data, -2 ) !== "\r\n" ) { + $this->_handle_error( $sock, + 'line ending missing from data block from $1' ); + return false; + } + $data = substr( $data, 0, -2 ); + $ret[$rkey] = $data; + + if ( $this->_have_zlib && $flags & self::COMPRESSED ) { + $ret[$rkey] = gzuncompress( $ret[$rkey] ); + } + + /* + * This unserialize is the exact reason that we only want to + * process data after having read until "END" (instead of doing + * this right away): "unserialize" can trigger outside code: + * in the event that $ret[$rkey] is a serialized object, + * unserializing it will trigger __wakeup() if present. If that + * function attempted to read from memcached (while we did not + * yet read "END"), these 2 calls would collide. + */ + if ( $flags & self::SERIALIZED ) { + $ret[$rkey] = $this->unserialize( $ret[$rkey] ); + } elseif ( $flags & self::INTVAL ) { + $ret[$rkey] = intval( $ret[$rkey] ); + } + } + + return true; + } else { + $this->_handle_error( $sock, 'Error parsing response from $1' ); + return false; + } + } + } + + // }}} + // {{{ _set() + + /** + * Performs the requested storage operation to the memcache server + * + * @param string $cmd Command to perform + * @param string $key Key to act on + * @param mixed $val What we need to store + * @param int $exp (optional) Expiration time. This can be a number of seconds + * to cache for (up to 30 days inclusive). Any timespans of 30 days + 1 second or + * longer must be the timestamp of the time at which the mapping should expire. It + * is safe to use timestamps in all cases, regardless of exipration + * eg: strtotime("+3 hour") + * @param float $casToken [optional] + * + * @return bool + * @access private + */ + function _set( $cmd, $key, $val, $exp, $casToken = null ) { + if ( !$this->_active ) { + return false; + } + + $sock = $this->get_sock( $key ); + if ( !is_resource( $sock ) ) { + return false; + } + + if ( isset( $this->stats[$cmd] ) ) { + $this->stats[$cmd]++; + } else { + $this->stats[$cmd] = 1; + } + + $flags = 0; + + if ( is_int( $val ) ) { + $flags |= self::INTVAL; + } elseif ( !is_scalar( $val ) ) { + $val = $this->serialize( $val ); + $flags |= self::SERIALIZED; + if ( $this->_debug ) { + $this->_debugprint( sprintf( "client: serializing data as it is not scalar" ) ); + } + } + + $len = strlen( $val ); + + if ( $this->_have_zlib && $this->_compress_enable + && $this->_compress_threshold && $len >= $this->_compress_threshold + ) { + $c_val = gzcompress( $val, 9 ); + $c_len = strlen( $c_val ); + + if ( $c_len < $len * ( 1 - self::COMPRESSION_SAVINGS ) ) { + if ( $this->_debug ) { + $this->_debugprint( sprintf( "client: compressing data; was %d bytes is now %d bytes", $len, $c_len ) ); + } + $val = $c_val; + $len = $c_len; + $flags |= self::COMPRESSED; + } + } + + $command = "$cmd $key $flags $exp $len"; + if ( $casToken ) { + $command .= " $casToken"; + } + + if ( !$this->_fwrite( $sock, "$command\r\n$val\r\n" ) ) { + return false; + } + + $line = $this->_fgets( $sock ); + + if ( $this->_debug ) { + $this->_debugprint( sprintf( "%s %s (%s)", $cmd, $key, $line ) ); + } + if ( $line === "STORED" ) { + return true; + } elseif ( $line === "NOT_STORED" && $cmd === "set" ) { + // "Not stored" is always used as the mcrouter response with AllAsyncRoute + return true; + } + + return false; + } + + // }}} + // {{{ sock_to_host() + + /** + * Returns the socket for the host + * + * @param string $host Host:IP to get socket for + * + * @return Resource|bool IO Stream or false + * @access private + */ + function sock_to_host( $host ) { + if ( isset( $this->_cache_sock[$host] ) ) { + return $this->_cache_sock[$host]; + } + + $sock = null; + $now = time(); + list( $ip, /* $port */) = explode( ':', $host ); + if ( isset( $this->_host_dead[$host] ) && $this->_host_dead[$host] > $now || + isset( $this->_host_dead[$ip] ) && $this->_host_dead[$ip] > $now + ) { + return null; + } + + if ( !$this->_connect_sock( $sock, $host ) ) { + return null; + } + + // Do not buffer writes + stream_set_write_buffer( $sock, 0 ); + + $this->_cache_sock[$host] = $sock; + + return $this->_cache_sock[$host]; + } + + /** + * @param string $text + */ + function _debugprint( $text ) { + $this->_logger->debug( $text ); + } + + /** + * @param string $text + */ + function _error_log( $text ) { + $this->_logger->error( "Memcached error: $text" ); + } + + /** + * Write to a stream. If there is an error, mark the socket dead. + * + * @param Resource $sock The socket + * @param string $buf The string to write + * @return bool True on success, false on failure + */ + function _fwrite( $sock, $buf ) { + $bytesWritten = 0; + $bufSize = strlen( $buf ); + while ( $bytesWritten < $bufSize ) { + $result = fwrite( $sock, $buf ); + $data = stream_get_meta_data( $sock ); + if ( $data['timed_out'] ) { + $this->_handle_error( $sock, 'timeout writing to $1' ); + return false; + } + // Contrary to the documentation, fwrite() returns zero on error in PHP 5.3. + if ( $result === false || $result === 0 ) { + $this->_handle_error( $sock, 'error writing to $1' ); + return false; + } + $bytesWritten += $result; + } + + return true; + } + + /** + * Handle an I/O error. Mark the socket dead and log an error. + * + * @param Resource $sock + * @param string $msg + */ + function _handle_error( $sock, $msg ) { + $peer = stream_socket_get_name( $sock, true /** remote **/ ); + if ( strval( $peer ) === '' ) { + $peer = array_search( $sock, $this->_cache_sock ); + if ( $peer === false ) { + $peer = '[unknown host]'; + } + } + $msg = str_replace( '$1', $peer, $msg ); + $this->_error_log( "$msg" ); + $this->_dead_sock( $sock ); + } + + /** + * Read the specified number of bytes from a stream. If there is an error, + * mark the socket dead. + * + * @param Resource $sock The socket + * @param int $len The number of bytes to read + * @return string|bool The string on success, false on failure. + */ + function _fread( $sock, $len ) { + $buf = ''; + while ( $len > 0 ) { + $result = fread( $sock, $len ); + $data = stream_get_meta_data( $sock ); + if ( $data['timed_out'] ) { + $this->_handle_error( $sock, 'timeout reading from $1' ); + return false; + } + if ( $result === false ) { + $this->_handle_error( $sock, 'error reading buffer from $1' ); + return false; + } + if ( $result === '' ) { + // This will happen if the remote end of the socket is shut down + $this->_handle_error( $sock, 'unexpected end of file reading from $1' ); + return false; + } + $len -= strlen( $result ); + $buf .= $result; + } + return $buf; + } + + /** + * Read a line from a stream. If there is an error, mark the socket dead. + * The \r\n line ending is stripped from the response. + * + * @param Resource $sock The socket + * @return string|bool The string on success, false on failure + */ + function _fgets( $sock ) { + $result = fgets( $sock ); + // fgets() may return a partial line if there is a select timeout after + // a successful recv(), so we have to check for a timeout even if we + // got a string response. + $data = stream_get_meta_data( $sock ); + if ( $data['timed_out'] ) { + $this->_handle_error( $sock, 'timeout reading line from $1' ); + return false; + } + if ( $result === false ) { + $this->_handle_error( $sock, 'error reading line from $1' ); + return false; + } + if ( substr( $result, -2 ) === "\r\n" ) { + $result = substr( $result, 0, -2 ); + } elseif ( substr( $result, -1 ) === "\n" ) { + $result = substr( $result, 0, -1 ); + } else { + $this->_handle_error( $sock, 'line ending missing in response from $1' ); + return false; + } + return $result; + } + + /** + * Flush the read buffer of a stream + * @param Resource $f + */ + function _flush_read_buffer( $f ) { + if ( !is_resource( $f ) ) { + return; + } + $r = array( $f ); + $w = null; + $e = null; + $n = stream_select( $r, $w, $e, 0, 0 ); + while ( $n == 1 && !feof( $f ) ) { + fread( $f, 1024 ); + $r = array( $f ); + $w = null; + $e = null; + $n = stream_select( $r, $w, $e, 0, 0 ); + } + } + + // }}} + // }}} + // }}} +} + +// }}} diff --git a/includes/libs/objectcache/wancache/WANObjectCache.php b/includes/libs/objectcache/wancache/WANObjectCache.php index 1852685d6c..b88b49697a 100644 --- a/includes/libs/objectcache/wancache/WANObjectCache.php +++ b/includes/libs/objectcache/wancache/WANObjectCache.php @@ -506,6 +506,7 @@ class WANObjectCache implements IExpiringStore, IStoreKeyEncoder, LoggerAwareInt } $purgeValues[] = $purge; } + return $purgeValues; } @@ -2207,14 +2208,14 @@ class WANObjectCache implements IExpiringStore, IStoreKeyEncoder, LoggerAwareInt // Wildcards select all matching routes, e.g. the WAN cluster on all DCs $ok = $this->cache->set( "/*/{$this->cluster}/{$key}", - $this->makePurgeValue( $this->getCurrentTime(), self::HOLDOFF_TTL_NONE ), + $this->makePurgeValue( $this->getCurrentTime(), $holdoff ), $ttl ); } else { - // This handles the mcrouter and the single-DC case + // Some other proxy handles broadcasting or there is only one datacenter $ok = $this->cache->set( $key, - $this->makePurgeValue( $this->getCurrentTime(), self::HOLDOFF_TTL_NONE ), + $this->makePurgeValue( $this->getCurrentTime(), $holdoff ), $ttl ); } diff --git a/includes/libs/rdbms/ChronologyProtector.php b/includes/libs/rdbms/ChronologyProtector.php index 8615cfc630..e1398b815b 100644 --- a/includes/libs/rdbms/ChronologyProtector.php +++ b/includes/libs/rdbms/ChronologyProtector.php @@ -224,10 +224,9 @@ class ChronologyProtector implements LoggerAwareInterface { implode( ', ', array_keys( $this->shutdownPositions ) ) . "\n" ); - // CP-protected writes should overwhelmingly go to the master datacenter, so use a - // DC-local lock to merge the values. Use a DC-local get() and a synchronous all-DC - // set(). This makes it possible for the BagOStuff class to write in parallel to all - // DCs with one RTT. The use of WRITE_SYNC avoids needing READ_LATEST for the get(). + // CP-protected writes should overwhelmingly go to the master datacenter, so merge the + // positions with a DC-local lock, a DC-local get(), and an all-DC set() with WRITE_SYNC. + // If set() returns success, then any get() should be able to see the new positions. if ( $store->lock( $this->key, 3 ) ) { if ( $workCallback ) { // Let the store run the work before blocking on a replication sync barrier. diff --git a/includes/libs/rdbms/database/DBConnRef.php b/includes/libs/rdbms/database/DBConnRef.php index f27d042ca9..f0b135fc82 100644 --- a/includes/libs/rdbms/database/DBConnRef.php +++ b/includes/libs/rdbms/database/DBConnRef.php @@ -80,6 +80,11 @@ class DBConnRef implements IDatabase { return $this->__call( __FUNCTION__, func_get_args() ); } + /** + * @param bool|null $buffer + * @return bool + * @deprecated Since 1.34 Use query batching + */ public function bufferResults( $buffer = null ) { return $this->__call( __FUNCTION__, func_get_args() ); } diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 5a40f4443a..f1b2ce277f 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -47,37 +47,6 @@ use Throwable; * @since 1.28 */ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAwareInterface { - /** @var string Server that this instance is currently connected to */ - protected $server; - /** @var string User that this instance is currently connected under the name of */ - protected $user; - /** @var string Password used to establish the current connection */ - protected $password; - /** @var array[] Map of (table => (dbname, schema, prefix) map) */ - protected $tableAliases = []; - /** @var string[] Map of (index alias => index) */ - protected $indexAliases = []; - /** @var bool Whether this PHP instance is for a CLI script */ - protected $cliMode; - /** @var string Agent name for query profiling */ - protected $agent; - /** @var int Bit field of class DBO_* constants */ - protected $flags; - /** @var array LoadBalancer tracking information */ - protected $lbInfo = []; - /** @var array|bool Variables use for schema element placeholders */ - protected $schemaVars = false; - /** @var array Parameters used by initConnection() to establish a connection */ - protected $connectionParams = []; - /** @var array SQL variables values to use for all new connections */ - protected $connectionVariables = []; - /** @var string Current SQL query delimiter */ - protected $delimiter = ';'; - /** @var string|bool|null Stashed value of html_errors INI setting */ - protected $htmlErrors; - /** @var int Row batch size to use for emulated INSERT SELECT queries */ - protected $nonNativeInsertSelectBatchSize = 10000; - /** @var BagOStuff APC cache */ protected $srvCache; /** @var LoggerInterface */ @@ -92,25 +61,62 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware protected $profiler; /** @var TransactionProfiler */ protected $trxProfiler; + /** @var DatabaseDomain */ protected $currentDomain; + /** @var object|resource|null Database connection */ protected $conn; /** @var IDatabase|null Lazy handle to the master DB this server replicates from */ private $lazyMasterHandle; + /** @var string Server that this instance is currently connected to */ + protected $server; + /** @var string User that this instance is currently connected under the name of */ + protected $user; + /** @var string Password used to establish the current connection */ + protected $password; + /** @var bool Whether this PHP instance is for a CLI script */ + protected $cliMode; + /** @var string Agent name for query profiling */ + protected $agent; + /** @var array Parameters used by initConnection() to establish a connection */ + protected $connectionParams; + /** @var string[]|int[]|float[] SQL variables values to use for all new connections */ + protected $connectionVariables; + /** @var int Row batch size to use for emulated INSERT SELECT queries */ + protected $nonNativeInsertSelectBatchSize; + + /** @var int Current bit field of class DBO_* constants */ + protected $flags; + /** @var array Current LoadBalancer tracking information */ + protected $lbInfo = []; + /** @var string Current SQL query delimiter */ + protected $delimiter = ';'; + /** @var array[] Current map of (table => (dbname, schema, prefix) map) */ + protected $tableAliases = []; + /** @var string[] Current map of (index alias => index) */ + protected $indexAliases = []; + /** @var array|null Current variables use for schema element placeholders */ + protected $schemaVars; + + /** @var string|bool|null Stashed value of html_errors INI setting */ + private $htmlErrors; + /** @var int[] Prior flags member variable values */ + private $priorFlags = []; + /** @var array Map of (name => 1) for locks obtained via lock() */ protected $sessionNamedLocks = []; /** @var array Map of (table name => 1) for TEMPORARY tables */ protected $sessionTempTables = []; /** @var string ID of the active transaction or the empty string otherwise */ - protected $trxShortId = ''; + private $trxShortId = ''; /** @var int Transaction status */ - protected $trxStatus = self::STATUS_TRX_NONE; + private $trxStatus = self::STATUS_TRX_NONE; /** @var Exception|null The last error that caused the status to become STATUS_TRX_ERROR */ - protected $trxStatusCause; + private $trxStatusCause; /** @var array|null Error details of the last statement-only rollback */ private $trxStatusIgnoredCause; /** @var float|null UNIX timestamp at the time of BEGIN for the last transaction */ @@ -154,9 +160,6 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware /** @var bool Whether to suppress triggering of transaction end callbacks */ private $trxEndCallbacksSuppressed = false; - /** @var int[] Prior flags member variable values */ - private $priorFlags = []; - /** @var integer|null Rows affected by the last query to query() or its CRUD wrappers */ protected $affectedRowCount; @@ -171,6 +174,8 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware /** @var float Query rount trip time estimate */ private $lastRoundTripEstimate = 0.0; + /** @var string Whether the database is a file on disk */ + const ATTR_DB_IS_FILE = 'db-is-file'; /** @var string Lock granularity is on the level of the entire database */ const ATTR_DB_LEVEL_LOCKING = 'db-level-locking'; /** @var string The SCHEMA keyword refers to a grouping of tables in a database */ @@ -233,30 +238,18 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * @note exceptions for missing libraries/drivers should be thrown in initConnection() * @param array $params Parameters passed from Database::factory() */ - protected function __construct( array $params ) { + public function __construct( array $params ) { + $this->connectionParams = []; foreach ( [ 'host', 'user', 'password', 'dbname', 'schema', 'tablePrefix' ] as $name ) { $this->connectionParams[$name] = $params[$name]; } - + $this->connectionVariables = $params['variables'] ?? []; $this->cliMode = $params['cliMode']; - // Agent name is added to SQL queries in a comment, so make sure it can't break out - $this->agent = str_replace( '/', '-', $params['agent'] ); - + $this->agent = $params['agent']; $this->flags = $params['flags']; - if ( $this->flags & self::DBO_DEFAULT ) { - if ( $this->cliMode ) { - $this->flags &= ~self::DBO_TRX; - } else { - $this->flags |= self::DBO_TRX; - } - } - // Disregard deprecated DBO_IGNORE flag (T189999) - $this->flags &= ~self::DBO_IGNORE; - - $this->connectionVariables = $params['variables']; + $this->nonNativeInsertSelectBatchSize = $params['nonNativeInsertSelectBatchSize'] ?? 10000; $this->srvCache = $params['srvCache'] ?? new HashBagOStuff(); - $this->profiler = is_callable( $params['profiler'] ) ? $params['profiler'] : null; $this->trxProfiler = $params['trxProfiler']; $this->connLogger = $params['connLogger']; @@ -264,10 +257,6 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware $this->errorLogger = $params['errorLogger']; $this->deprecationLogger = $params['deprecationLogger']; - if ( isset( $params['nonNativeInsertSelectBatchSize'] ) ) { - $this->nonNativeInsertSelectBatchSize = $params['nonNativeInsertSelectBatchSize']; - } - // Set initial dummy domain until open() sets the final DB/prefix $this->currentDomain = new DatabaseDomain( $params['dbname'] != '' ? $params['dbname'] : null, @@ -397,6 +386,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware 'cliMode' => (bool)$params['cliMode'], 'agent' => (string)$params['agent'], // Objects and callbacks + 'srvCache' => $params['srvCache'] ?? new HashBagOStuff(), 'profiler' => $params['profiler'] ?? null, 'trxProfiler' => $params['trxProfiler'] ?? new TransactionProfiler(), 'connLogger' => $params['connLogger'] ?? new NullLogger(), @@ -430,6 +420,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware */ final public static function attributesFromType( $dbType, $driver = null ) { static $defaults = [ + self::ATTR_DB_IS_FILE => false, self::ATTR_DB_LEVEL_LOCKING => false, self::ATTR_SCHEMAS_AS_TABLE_GROUPS => false ]; @@ -453,7 +444,6 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware // we auto-detect the first available driver. For types without built-in support, // an class named "Database" us used, eg. DatabaseFoo for type 'foo'. static $builtinTypes = [ - 'mssql' => DatabaseMssql::class, 'mysql' => [ 'mysqli' => DatabaseMysqli::class ], 'sqlite' => DatabaseSqlite::class, 'postgres' => DatabasePostgres::class, @@ -494,7 +484,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware } /** - * @return array Map of (Database::ATTR_* constant => value + * @return array Map of (Database::ATTR_* constant => value) * @since 1.31 */ protected static function getAttributes() { @@ -516,15 +506,15 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware return $this->getServerVersion(); } + /** + * Backwards-compatibility no-op method for disabling query buffering + * + * @param null|bool $buffer Whether to buffer queries (ignored) + * @return bool Whether buffering was already enabled (always true) + * @deprecated Since 1.34 Use query batching; this no longer does anything + */ public function bufferResults( $buffer = null ) { - $res = !$this->getFlag( self::DBO_NOBUFFER ); - if ( $buffer !== null ) { - $buffer - ? $this->clearFlag( self::DBO_NOBUFFER ) - : $this->setFlag( self::DBO_NOBUFFER ); - } - - return $res; + return true; } final public function trxLevel() { @@ -968,7 +958,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * @throws DBReadOnlyError */ protected function assertIsWritableMaster() { - if ( $this->getLBInfo( 'replica' ) === true ) { + if ( $this->getLBInfo( 'replica' ) ) { throw new DBReadOnlyRoleError( $this, 'Write operations are not allowed on replica database connections' @@ -1151,7 +1141,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware // Send the query to the server and fetch any corresponding errors list( $ret, $err, $errno, $unignorable ) = $this->executeQuery( $sql, $fname, $flags ); if ( $ret === false ) { - $ignoreErrors = $this->hasFlags( $flags, self::QUERY_SILENCE_ERRORS ); + $ignoreErrors = $this->fieldHasBit( $flags, self::QUERY_SILENCE_ERRORS ); // Throw an error unless both the ignore flag was set and a rollback is not needed $this->reportQueryError( $err, $errno, $sql, $fname, $ignoreErrors && !$unignorable ); } @@ -1191,11 +1181,11 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware // Do not treat temporary table writes as "meaningful writes" since they are only // visible to one session and are not permanent. Profile them as reads. Integration // tests can override this behavior via $flags. - $pseudoPermanent = $this->hasFlags( $flags, self::QUERY_PSEUDO_PERMANENT ); + $pseudoPermanent = $this->fieldHasBit( $flags, self::QUERY_PSEUDO_PERMANENT ); list( $tmpType, $tmpNew, $tmpDel ) = $this->getTempWrites( $sql, $pseudoPermanent ); $isPermWrite = ( $tmpType !== self::$TEMP_NORMAL ); // DBConnRef uses QUERY_REPLICA_ROLE to enforce the replica role for raw SQL queries - if ( $isPermWrite && $this->hasFlags( $flags, self::QUERY_REPLICA_ROLE ) ) { + if ( $isPermWrite && $this->fieldHasBit( $flags, self::QUERY_REPLICA_ROLE ) ) { throw new DBReadOnlyRoleError( $this, "Cannot write; target role is DB_REPLICA" ); } } else { @@ -1206,8 +1196,9 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware } // Add trace comment to the begin of the sql string, right after the operator. - // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (T44598) - $commentedSql = preg_replace( '/\s|$/', " /* $fname {$this->agent} */ ", $sql, 1 ); + // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (T44598). + $encAgent = str_replace( '/', '-', $this->agent ); + $commentedSql = preg_replace( '/\s|$/', " /* $fname $encAgent */ ", $sql, 1 ); // Send the query to the server and fetch any corresponding errors. // This also doubles as a "ping" to see if the connection was dropped. @@ -1215,7 +1206,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware $this->executeQueryAttempt( $sql, $commentedSql, $isPermWrite, $fname, $flags ); // Check if the query failed due to a recoverable connection loss - $allowRetry = !$this->hasFlags( $flags, self::QUERY_NO_RETRY ); + $allowRetry = !$this->fieldHasBit( $flags, self::QUERY_NO_RETRY ); if ( $ret === false && $recoverableCL && $reconnected && $allowRetry ) { // Silently resend the query to the server since it is safe and possible list( $ret, $err, $errno, $recoverableSR, $recoverableCL ) = @@ -1286,7 +1277,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware } } - $prefix = !is_null( $this->getLBInfo( 'master' ) ) ? 'query-m: ' : 'query: '; + $prefix = $this->getLBInfo( 'master' ) ? 'query-m: ' : 'query: '; $generalizedSql = new GeneralizedSql( $sql, $this->trxShortId, $prefix ); $startTime = microtime( true ); @@ -4282,10 +4273,8 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware } // This will reconnect if possible or return false if not - $this->clearFlag( self::DBO_TRX, self::REMEMBER_PRIOR ); - $ok = ( $this->query( self::$PING_QUERY, __METHOD__, true ) !== false ); - $this->restoreFlags( self::RESTORE_PRIOR ); - + $flags = self::QUERY_IGNORE_DBO_TRX | self::QUERY_SILENCE_ERRORS; + $ok = ( $this->query( self::$PING_QUERY, __METHOD__, $flags ) !== false ); if ( $ok ) { $rtt = $this->lastRoundTripEstimate; } @@ -4475,7 +4464,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware } public function setSchemaVars( $vars ) { - $this->schemaVars = $vars; + $this->schemaVars = is_array( $vars ) ? $vars : null; } public function sourceStream( @@ -4627,11 +4616,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * @return array */ protected function getSchemaVars() { - if ( $this->schemaVars ) { - return $this->schemaVars; - } else { - return $this->getDefaultSchemaVars(); - } + return $this->schemaVars ?? $this->getDefaultSchemaVars(); } /** @@ -4821,8 +4806,9 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * @param int $field * @param int $flags * @return bool + * @since 1.34 */ - protected function hasFlags( $field, $flags ) { + final protected function fieldHasBit( $field, $flags ) { return ( ( $field & $flags ) === $flags ); } diff --git a/includes/libs/rdbms/database/DatabaseMssql.php b/includes/libs/rdbms/database/DatabaseMssql.php deleted file mode 100644 index 9d4a364a88..0000000000 --- a/includes/libs/rdbms/database/DatabaseMssql.php +++ /dev/null @@ -1,1418 +0,0 @@ - - * @author Chris Pucci - * @author Ryan Biesemeyer - * @author Ryan Schmidt - */ - -namespace Wikimedia\Rdbms; - -use Exception; -use RuntimeException; -use stdClass; -use Wikimedia\AtEase\AtEase; - -/** - * @ingroup Database - */ -class DatabaseMssql extends Database { - /** @var int */ - protected $serverPort; - /** @var bool */ - protected $useWindowsAuth = false; - /** @var int|null */ - protected $lastInsertId = null; - /** @var int|null */ - protected $lastAffectedRowCount = null; - /** @var int */ - protected $subqueryId = 0; - /** @var bool */ - protected $scrollableCursor = true; - /** @var bool */ - protected $prepareStatements = true; - /** @var stdClass[][]|null */ - protected $binaryColumnCache = null; - /** @var stdClass[][]|null */ - protected $bitColumnCache = null; - /** @var bool */ - protected $ignoreDupKeyErrors = false; - /** @var string[] */ - protected $ignoreErrors = []; - - public function implicitOrderby() { - return false; - } - - public function unionSupportsOrderAndLimit() { - return false; - } - - public function __construct( array $params ) { - $this->serverPort = $params['port']; - $this->useWindowsAuth = $params['UseWindowsAuth']; - - parent::__construct( $params ); - } - - protected function open( $server, $user, $password, $dbName, $schema, $tablePrefix ) { - if ( !function_exists( 'sqlsrv_connect' ) ) { - throw new DBConnectionError( - $this, - "Microsoft SQL Server Native (sqlsrv) functions missing.\n - You can download the driver from: http://go.microsoft.com/fwlink/?LinkId=123470" - ); - } - - $this->close(); - - if ( $schema !== null ) { - throw $this->newExceptionAfterConnectError( "Got schema '$schema'; not supported." ); - } - - $this->server = $server; - $this->user = $user; - $this->password = $password; - - $connectionInfo = []; - if ( strlen( $dbName ) ) { - $connectionInfo['Database'] = $dbName; - } - if ( !$this->useWindowsAuth ) { - $connectionInfo['UID'] = $user; - $connectionInfo['PWD'] = $password; - } - - AtEase::suppressWarnings(); - $this->conn = sqlsrv_connect( $server, $connectionInfo ) ?: null; - AtEase::restoreWarnings(); - - if ( !$this->conn ) { - throw $this->newExceptionAfterConnectError( $this->lastError() ); - } - - try { - $this->currentDomain = new DatabaseDomain( - strlen( $dbName ) ? $dbName : null, - null, - $tablePrefix - ); - } catch ( Exception $e ) { - throw $this->newExceptionAfterConnectError( $e->getMessage() ); - } - } - - /** - * Closes a database connection, if it is open - * Returns success, true if already closed - * @return bool - */ - protected function closeConnection() { - return sqlsrv_close( $this->conn ); - } - - /** - * @param bool|MssqlResultWrapper|resource $result - * @return bool|MssqlResultWrapper - */ - protected function resultObject( $result ) { - if ( !$result ) { - return false; - } elseif ( $result instanceof MssqlResultWrapper ) { - return $result; - } elseif ( $result === true ) { - // Successful write query - return $result; - } else { - return new MssqlResultWrapper( $this, $result ); - } - } - - /** - * @param string $sql - * @return bool|MssqlResultWrapper|resource - */ - protected function doQuery( $sql ) { - // several extensions seem to think that all databases support limits - // via LIMIT N after the WHERE clause, but MSSQL uses SELECT TOP N, - // so to catch any of those extensions we'll do a quick check for a - // LIMIT clause and pass $sql through $this->LimitToTopN() which parses - // the LIMIT clause and passes the result to $this->limitResult(); - if ( preg_match( '/\bLIMIT\s*/i', $sql ) ) { - // massage LIMIT -> TopN - $sql = $this->LimitToTopN( $sql ); - } - - // MSSQL doesn't have EXTRACT(epoch FROM XXX) - if ( preg_match( '#\bEXTRACT\s*?\(\s*?EPOCH\s+FROM\b#i', $sql, $matches ) ) { - // This is same as UNIX_TIMESTAMP, we need to calc # of seconds from 1970 - $sql = str_replace( $matches[0], "DATEDIFF(s,CONVERT(datetime,'1/1/1970'),", $sql ); - } - - // perform query - - // SQLSRV_CURSOR_STATIC is slower than SQLSRV_CURSOR_CLIENT_BUFFERED (one of the two is - // needed if we want to be able to seek around the result set), however CLIENT_BUFFERED - // has a bug in the sqlsrv driver where wchar_t types (such as nvarchar) that are empty - // strings make php throw a fatal error "Severe error translating Unicode" - if ( $this->scrollableCursor ) { - $scrollArr = [ 'Scrollable' => SQLSRV_CURSOR_STATIC ]; - } else { - $scrollArr = []; - } - - if ( $this->prepareStatements ) { - // we do prepare + execute so we can get its field metadata for later usage if desired - $stmt = sqlsrv_prepare( $this->conn, $sql, [], $scrollArr ); - $success = sqlsrv_execute( $stmt ); - } else { - $stmt = sqlsrv_query( $this->conn, $sql, [], $scrollArr ); - $success = (bool)$stmt; - } - - // Make a copy to ensure what we add below does not get reflected in future queries - $ignoreErrors = $this->ignoreErrors; - - if ( $this->ignoreDupKeyErrors ) { - // ignore duplicate key errors - // this emulates INSERT IGNORE in MySQL - $ignoreErrors[] = '2601'; // duplicate key error caused by unique index - $ignoreErrors[] = '2627'; // duplicate key error caused by primary key - $ignoreErrors[] = '3621'; // generic "the statement has been terminated" error - } - - if ( $success === false ) { - $errors = sqlsrv_errors(); - $success = true; - - foreach ( $errors as $err ) { - if ( !in_array( $err['code'], $ignoreErrors ) ) { - $success = false; - break; - } - } - - if ( $success === false ) { - return false; - } - } - // remember number of rows affected - $this->lastAffectedRowCount = sqlsrv_rows_affected( $stmt ); - - return $stmt; - } - - public function freeResult( $res ) { - sqlsrv_free_stmt( ResultWrapper::unwrap( $res ) ); - } - - /** - * @param IResultWrapper $res - * @return stdClass - */ - public function fetchObject( $res ) { - // $res is expected to be an instance of MssqlResultWrapper here - return $res->fetchObject(); - } - - /** - * @param IResultWrapper $res - * @return array - */ - public function fetchRow( $res ) { - return $res->fetchRow(); - } - - /** - * @param mixed $res - * @return int - */ - public function numRows( $res ) { - $res = ResultWrapper::unwrap( $res ); - - $ret = sqlsrv_num_rows( $res ); - if ( $ret === false ) { - // we cannot get an amount of rows from this cursor type - // has_rows returns bool true/false if the result has rows - $ret = (int)sqlsrv_has_rows( $res ); - } - - return $ret; - } - - /** - * @param mixed $res - * @return int - */ - public function numFields( $res ) { - return sqlsrv_num_fields( ResultWrapper::unwrap( $res ) ); - } - - /** - * @param mixed $res - * @param int $n - * @return int - */ - public function fieldName( $res, $n ) { - return sqlsrv_field_metadata( ResultWrapper::unwrap( $res ) )[$n]['Name']; - } - - /** - * This must be called after nextSequenceVal - * @return int|null - */ - public function insertId() { - return $this->lastInsertId; - } - - /** - * @param MssqlResultWrapper $res - * @param int $row - * @return bool - */ - public function dataSeek( $res, $row ) { - return $res->seek( $row ); - } - - /** - * @return string - */ - public function lastError() { - $strRet = ''; - $retErrors = sqlsrv_errors( SQLSRV_ERR_ALL ); - if ( $retErrors != null ) { - foreach ( $retErrors as $arrError ) { - $strRet .= $this->formatError( $arrError ) . "\n"; - } - } else { - $strRet = "No errors found"; - } - - return $strRet; - } - - /** - * @param array $err - * @return string - */ - private function formatError( $err ) { - return '[SQLSTATE ' . - $err['SQLSTATE'] . '][Error Code ' . $err['code'] . ']' . $err['message']; - } - - /** - * @return string|int - */ - public function lastErrno() { - $err = sqlsrv_errors( SQLSRV_ERR_ALL ); - if ( $err !== null && isset( $err[0] ) ) { - return $err[0]['code']; - } else { - return 0; - } - } - - protected function wasKnownStatementRollbackError() { - $errors = sqlsrv_errors( SQLSRV_ERR_ALL ); - if ( !$errors ) { - return false; - } - // The transaction vs statement rollback behavior depends on XACT_ABORT, so make sure - // that the "statement has been terminated" error (3621) is specifically present. - // https://docs.microsoft.com/en-us/sql/t-sql/statements/set-xact-abort-transact-sql - $statementOnly = false; - $codeWhitelist = [ '2601', '2627', '547' ]; - foreach ( $errors as $error ) { - if ( $error['code'] == '3621' ) { - $statementOnly = true; - } elseif ( !in_array( $error['code'], $codeWhitelist ) ) { - $statementOnly = false; - break; - } - } - - return $statementOnly; - } - - public function serverIsReadOnly() { - $encDatabase = $this->addQuotes( $this->getDBname() ); - $res = $this->query( - "SELECT IS_READ_ONLY FROM SYS.DATABASES WHERE NAME = $encDatabase", - __METHOD__ - ); - $row = $this->fetchObject( $res ); - - return $row ? (bool)$row->IS_READ_ONLY : false; - } - - /** - * @return int - */ - protected function fetchAffectedRowCount() { - return $this->lastAffectedRowCount; - } - - /** - * SELECT wrapper - * - * @param mixed $table Array or string, table name(s) (prefix auto-added) - * @param mixed $vars Array or string, field name(s) to be retrieved - * @param mixed $conds Array or string, condition(s) for WHERE - * @param string $fname Calling function name (use __METHOD__) for logs/profiling - * @param array $options Associative array of options (e.g. - * [ 'GROUP BY' => 'page_title' ]), see Database::makeSelectOptions - * code for list of supported stuff - * @param array $join_conds Associative array of table join conditions - * (optional) (e.g. [ 'page' => [ 'LEFT JOIN','page_latest=rev_id' ] ] - * @return mixed Database result resource (feed to Database::fetchObject - * or whatever), or false on failure - * @throws DBQueryError - * @throws DBUnexpectedError - * @throws Exception - */ - public function select( $table, $vars, $conds = '', $fname = __METHOD__, - $options = [], $join_conds = [] - ) { - $sql = $this->selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds ); - if ( isset( $options['EXPLAIN'] ) ) { - try { - $this->scrollableCursor = false; - $this->prepareStatements = false; - $this->query( "SET SHOWPLAN_ALL ON" ); - $ret = $this->query( $sql, $fname ); - $this->query( "SET SHOWPLAN_ALL OFF" ); - } catch ( DBQueryError $dqe ) { - if ( isset( $options['FOR COUNT'] ) ) { - // likely don't have privs for SHOWPLAN, so run a select count instead - $this->query( "SET SHOWPLAN_ALL OFF" ); - unset( $options['EXPLAIN'] ); - $ret = $this->select( - $table, - 'COUNT(*) AS EstimateRows', - $conds, - $fname, - $options, - $join_conds - ); - } else { - // someone actually wanted the query plan instead of an est row count - // let them know of the error - $this->scrollableCursor = true; - $this->prepareStatements = true; - throw $dqe; - } - } - $this->scrollableCursor = true; - $this->prepareStatements = true; - return $ret; - } - return $this->query( $sql, $fname ); - } - - /** - * SELECT wrapper - * - * @param mixed $table Array or string, table name(s) (prefix auto-added) - * @param mixed $vars Array or string, field name(s) to be retrieved - * @param mixed $conds Array or string, condition(s) for WHERE - * @param string $fname Calling function name (use __METHOD__) for logs/profiling - * @param array $options Associative array of options (e.g. [ 'GROUP BY' => 'page_title' ]), - * see Database::makeSelectOptions code for list of supported stuff - * @param array $join_conds Associative array of table join conditions (optional) - * (e.g. [ 'page' => [ 'LEFT JOIN','page_latest=rev_id' ] ] - * @return string The SQL text - */ - public function selectSQLText( $table, $vars, $conds = '', $fname = __METHOD__, - $options = [], $join_conds = [] - ) { - if ( isset( $options['EXPLAIN'] ) ) { - unset( $options['EXPLAIN'] ); - } - - $sql = parent::selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds ); - - // try to rewrite aggregations of bit columns (currently MAX and MIN) - if ( strpos( $sql, 'MAX(' ) !== false || strpos( $sql, 'MIN(' ) !== false ) { - $bitColumns = []; - if ( is_array( $table ) ) { - $tables = $table; - while ( $tables ) { - $t = array_pop( $tables ); - if ( is_array( $t ) ) { - $tables = array_merge( $tables, $t ); - } else { - $bitColumns += $this->getBitColumns( $this->tableName( $t ) ); - } - } - } else { - $bitColumns = $this->getBitColumns( $this->tableName( $table ) ); - } - - foreach ( $bitColumns as $col => $info ) { - $replace = [ - "MAX({$col})" => "MAX(CAST({$col} AS tinyint))", - "MIN({$col})" => "MIN(CAST({$col} AS tinyint))", - ]; - $sql = str_replace( array_keys( $replace ), array_values( $replace ), $sql ); - } - } - - return $sql; - } - - public function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, - $fname = __METHOD__ - ) { - $this->scrollableCursor = false; - try { - parent::deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname ); - } catch ( Exception $e ) { - $this->scrollableCursor = true; - throw $e; - } - $this->scrollableCursor = true; - } - - public function delete( $table, $conds, $fname = __METHOD__ ) { - $this->scrollableCursor = false; - try { - parent::delete( $table, $conds, $fname ); - } catch ( Exception $e ) { - $this->scrollableCursor = true; - throw $e; - } - $this->scrollableCursor = true; - - return true; - } - - /** - * Estimate rows in dataset - * Returns estimated count, based on SHOWPLAN_ALL output - * This is not necessarily an accurate estimate, so use sparingly - * Returns -1 if count cannot be found - * Takes same arguments as Database::select() - * @param string $table - * @param string $var - * @param string $conds - * @param string $fname - * @param array $options - * @param array $join_conds - * @return int - */ - public function estimateRowCount( $table, $var = '*', $conds = '', - $fname = __METHOD__, $options = [], $join_conds = [] - ) { - $conds = $this->normalizeConditions( $conds, $fname ); - $column = $this->extractSingleFieldFromList( $var ); - if ( is_string( $column ) && !in_array( $column, [ '*', '1' ] ) ) { - $conds[] = "$column IS NOT NULL"; - } - - // http://msdn2.microsoft.com/en-us/library/aa259203.aspx - $options['EXPLAIN'] = true; - $options['FOR COUNT'] = true; - $res = $this->select( $table, $var, $conds, $fname, $options, $join_conds ); - - $rows = -1; - if ( $res ) { - $row = $this->fetchRow( $res ); - - if ( isset( $row['EstimateRows'] ) ) { - $rows = (int)$row['EstimateRows']; - } - } - - return $rows; - } - - /** - * Returns information about an index - * If errors are explicitly ignored, returns NULL on failure - * @param string $table - * @param string $index - * @param string $fname - * @return array|bool|null - */ - public function indexInfo( $table, $index, $fname = __METHOD__ ) { - # This does not return the same info as MYSQL would, but that's OK - # because MediaWiki never uses the returned value except to check for - # the existence of indexes. - $sql = "sp_helpindex '" . $this->tableName( $table ) . "'"; - $res = $this->query( $sql, $fname ); - - if ( !$res ) { - return null; - } - - $result = []; - foreach ( $res as $row ) { - if ( $row->index_name == $index ) { - $row->Non_unique = !stristr( $row->index_description, "unique" ); - $cols = explode( ", ", $row->index_keys ); - foreach ( $cols as $col ) { - $row->Column_name = trim( $col ); - $result[] = clone $row; - } - } elseif ( $index == 'PRIMARY' && stristr( $row->index_description, 'PRIMARY' ) ) { - $row->Non_unique = 0; - $cols = explode( ", ", $row->index_keys ); - foreach ( $cols as $col ) { - $row->Column_name = trim( $col ); - $result[] = clone $row; - } - } - } - - return $result ?: false; - } - - /** - * INSERT wrapper, inserts an array into a table - * - * $arrToInsert may be a single associative array, or an array of these with numeric keys, for - * multi-row insert. - * - * Usually aborts on failure - * If errors are explicitly ignored, returns success - * @param string $table - * @param array $arrToInsert - * @param string $fname - * @param array $options - * @return bool - * @throws Exception - */ - public function insert( $table, $arrToInsert, $fname = __METHOD__, $options = [] ) { - # No rows to insert, easy just return now - if ( !count( $arrToInsert ) ) { - return true; - } - - if ( !is_array( $options ) ) { - $options = [ $options ]; - } - - $table = $this->tableName( $table ); - - if ( !( isset( $arrToInsert[0] ) && is_array( $arrToInsert[0] ) ) ) { // Not multi row - $arrToInsert = [ 0 => $arrToInsert ]; // make everything multi row compatible - } - - // We know the table we're inserting into, get its identity column - $identity = null; - // strip matching square brackets and the db/schema from table name - $tableRawArr = explode( '.', preg_replace( '#\[([^\]]*)\]#', '$1', $table ) ); - $tableRaw = array_pop( $tableRawArr ); - $res = $this->doQuery( - "SELECT NAME AS idColumn FROM SYS.IDENTITY_COLUMNS " . - "WHERE OBJECT_NAME(OBJECT_ID)='{$tableRaw}'" - ); - if ( $res && sqlsrv_has_rows( $res ) ) { - // There is an identity for this table. - $identityArr = sqlsrv_fetch_array( $res, SQLSRV_FETCH_ASSOC ); - $identity = array_pop( $identityArr ); - } - sqlsrv_free_stmt( $res ); - - // Determine binary/varbinary fields so we can encode data as a hex string like 0xABCDEF - $binaryColumns = $this->getBinaryColumns( $table ); - - // INSERT IGNORE is not supported by SQL Server - // remove IGNORE from options list and set ignore flag to true - if ( in_array( 'IGNORE', $options ) ) { - $options = array_diff( $options, [ 'IGNORE' ] ); - $this->ignoreDupKeyErrors = true; - } - - $ret = null; - foreach ( $arrToInsert as $a ) { - // start out with empty identity column, this is so we can return - // it as a result of the INSERT logic - $sqlPre = ''; - $sqlPost = ''; - $identityClause = ''; - - // if we have an identity column - if ( $identity ) { - // iterate through - foreach ( $a as $k => $v ) { - if ( $k == $identity ) { - if ( !is_null( $v ) ) { - // there is a value being passed to us, - // we need to turn on and off inserted identity - $sqlPre = "SET IDENTITY_INSERT $table ON;"; - $sqlPost = ";SET IDENTITY_INSERT $table OFF;"; - } else { - // we can't insert NULL into an identity column, - // so remove the column from the insert. - unset( $a[$k] ); - } - } - } - - // we want to output an identity column as result - $identityClause = "OUTPUT INSERTED.$identity "; - } - - $keys = array_keys( $a ); - - // Build the actual query - $sql = $sqlPre . 'INSERT ' . implode( ' ', $options ) . - " INTO $table (" . implode( ',', $keys ) . ") $identityClause VALUES ("; - - $first = true; - foreach ( $a as $key => $value ) { - if ( isset( $binaryColumns[$key] ) ) { - $value = new MssqlBlob( $value ); - } - if ( $first ) { - $first = false; - } else { - $sql .= ','; - } - if ( is_null( $value ) ) { - $sql .= 'null'; - } else { - $sql .= $this->addQuotes( $value ); - } - } - $sql .= ')' . $sqlPost; - - // Run the query - $this->scrollableCursor = false; - try { - $ret = $this->query( $sql ); - } catch ( Exception $e ) { - $this->scrollableCursor = true; - $this->ignoreDupKeyErrors = false; - throw $e; - } - $this->scrollableCursor = true; - - if ( $ret instanceof IResultWrapper && !is_null( $identity ) ) { - // Then we want to get the identity column value we were assigned and save it off - $row = $ret->fetchObject(); - if ( is_object( $row ) ) { - $this->lastInsertId = $row->$identity; - // It seems that mAffectedRows is -1 sometimes when OUTPUT INSERTED.identity is - // used if we got an identity back, we know for sure a row was affected, so - // adjust that here - if ( $this->lastAffectedRowCount == -1 ) { - $this->lastAffectedRowCount = 1; - } - } - } - } - - $this->ignoreDupKeyErrors = false; - - return true; - } - - /** - * INSERT SELECT wrapper - * $varMap must be an associative array of the form [ 'dest1' => 'source1', ... ] - * Source items may be literals rather than field names, but strings should - * be quoted with Database::addQuotes(). - * @param string $destTable - * @param array|string $srcTable May be an array of tables. - * @param array $varMap - * @param array $conds May be "*" to copy the whole table. - * @param string $fname - * @param array $insertOptions - * @param array $selectOptions - * @param array $selectJoinConds - * @throws Exception - */ - protected function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds, $fname = __METHOD__, - $insertOptions = [], $selectOptions = [], $selectJoinConds = [] - ) { - $this->scrollableCursor = false; - try { - parent::nativeInsertSelect( - $destTable, - $srcTable, - $varMap, - $conds, - $fname, - $insertOptions, - $selectOptions, - $selectJoinConds - ); - } catch ( Exception $e ) { - $this->scrollableCursor = true; - throw $e; - } - $this->scrollableCursor = true; - } - - /** - * UPDATE wrapper. Takes a condition array and a SET array. - * - * @param string $table Name of the table to UPDATE. This will be passed through - * Database::tableName(). - * - * @param array $values An array of values to SET. For each array element, - * the key gives the field name, and the value gives the data - * to set that field to. The data will be quoted by - * Database::addQuotes(). - * - * @param array $conds An array of conditions (WHERE). See - * Database::select() for the details of the format of - * condition arrays. Use '*' to update all rows. - * - * @param string $fname The function name of the caller (from __METHOD__), - * for logging and profiling. - * - * @param array $options An array of UPDATE options, can be: - * - IGNORE: Ignore unique key conflicts - * @return bool - * @throws DBUnexpectedError - * @throws Exception - */ - function update( $table, $values, $conds, $fname = __METHOD__, $options = [] ) { - $table = $this->tableName( $table ); - $binaryColumns = $this->getBinaryColumns( $table ); - - $opts = $this->makeUpdateOptions( $options ); - $sql = "UPDATE $opts $table SET " . $this->makeList( $values, LIST_SET, $binaryColumns ); - - if ( $conds !== [] && $conds !== '*' ) { - $sql .= " WHERE " . $this->makeList( $conds, LIST_AND, $binaryColumns ); - } - - $this->scrollableCursor = false; - try { - $this->query( $sql ); - } catch ( Exception $e ) { - $this->scrollableCursor = true; - throw $e; - } - $this->scrollableCursor = true; - return true; - } - - /** - * Makes an encoded list of strings from an array - * @param array $a Containing the data - * @param int $mode Constant - * - LIST_COMMA: comma separated, no field names - * - LIST_AND: ANDed WHERE clause (without the WHERE). See - * the documentation for $conds in Database::select(). - * - LIST_OR: ORed WHERE clause (without the WHERE) - * - LIST_SET: comma separated with field names, like a SET clause - * - LIST_NAMES: comma separated field names - * @param array $binaryColumns Contains a list of column names that are binary types - * This is a custom parameter only present for MS SQL. - * - * @throws DBUnexpectedError - * @return string - */ - public function makeList( $a, $mode = LIST_COMMA, $binaryColumns = [] ) { - if ( !is_array( $a ) ) { - throw new DBUnexpectedError( $this, __METHOD__ . ' called with incorrect parameters' ); - } - - if ( $mode != LIST_NAMES ) { - // In MS SQL, values need to be specially encoded when they are - // inserted into binary fields. Perform this necessary encoding - // for the specified set of columns. - foreach ( array_keys( $a ) as $field ) { - if ( !isset( $binaryColumns[$field] ) ) { - continue; - } - - if ( is_array( $a[$field] ) ) { - foreach ( $a[$field] as &$v ) { - $v = new MssqlBlob( $v ); - } - unset( $v ); - } else { - $a[$field] = new MssqlBlob( $a[$field] ); - } - } - } - - return parent::makeList( $a, $mode ); - } - - /** - * @param string $table - * @param string $field - * @return int Returns the size of a text field, or -1 for "unlimited" - */ - public function textFieldSize( $table, $field ) { - $table = $this->tableName( $table ); - $sql = "SELECT CHARACTER_MAXIMUM_LENGTH,DATA_TYPE FROM INFORMATION_SCHEMA.Columns - WHERE TABLE_NAME = '$table' AND COLUMN_NAME = '$field'"; - $res = $this->query( $sql ); - $row = $this->fetchRow( $res ); - $size = -1; - if ( strtolower( $row['DATA_TYPE'] ) != 'text' ) { - $size = $row['CHARACTER_MAXIMUM_LENGTH']; - } - - return $size; - } - - /** - * Construct a LIMIT query with optional offset - * This is used for query pages - * - * @param string $sql SQL query we will append the limit too - * @param int $limit The SQL limit - * @param bool|int $offset The SQL offset (default false) - * @return array|string - * @throws DBUnexpectedError - */ - public function limitResult( $sql, $limit, $offset = false ) { - if ( $offset === false || $offset == 0 ) { - if ( strpos( $sql, "SELECT" ) === false ) { - return "TOP {$limit} " . $sql; - } else { - return preg_replace( '/\bSELECT(\s+DISTINCT)?\b/Dsi', - 'SELECT$1 TOP ' . $limit, $sql, 1 ); - } - } else { - // This one is fun, we need to pull out the select list as well as any ORDER BY clause - $select = $orderby = []; - $s1 = preg_match( '#SELECT\s+(.+?)\s+FROM#Dis', $sql, $select ); - $s2 = preg_match( '#(ORDER BY\s+.+?)(\s*FOR XML .*)?$#Dis', $sql, $orderby ); - $postOrder = ''; - $first = $offset + 1; - $last = $offset + $limit; - $sub1 = 'sub_' . $this->subqueryId; - $sub2 = 'sub_' . ( $this->subqueryId + 1 ); - $this->subqueryId += 2; - if ( !$s1 ) { - // wat - throw new DBUnexpectedError( $this, "Attempting to LIMIT a non-SELECT query\n" ); - } - if ( !$s2 ) { - // no ORDER BY - $overOrder = 'ORDER BY (SELECT 1)'; - } else { - if ( !isset( $orderby[2] ) || !$orderby[2] ) { - // don't need to strip it out if we're using a FOR XML clause - $sql = str_replace( $orderby[1], '', $sql ); - } - $overOrder = $orderby[1]; - $postOrder = ' ' . $overOrder; - } - $sql = "SELECT {$select[1]} - FROM ( - SELECT ROW_NUMBER() OVER({$overOrder}) AS rowNumber, * - FROM ({$sql}) {$sub1} - ) {$sub2} - WHERE rowNumber BETWEEN {$first} AND {$last}{$postOrder}"; - - return $sql; - } - } - - /** - * If there is a limit clause, parse it, strip it, and pass the remaining - * SQL through limitResult() with the appropriate parameters. Not the - * prettiest solution, but better than building a whole new parser. This - * exists becase there are still too many extensions that don't use dynamic - * sql generation. - * - * @param string $sql - * @return array|mixed|string - */ - public function LimitToTopN( $sql ) { - // Matches: LIMIT {[offset,] row_count | row_count OFFSET offset} - $pattern = '/\bLIMIT\s+((([0-9]+)\s*,\s*)?([0-9]+)(\s+OFFSET\s+([0-9]+))?)/i'; - if ( preg_match( $pattern, $sql, $matches ) ) { - $row_count = $matches[4]; - $offset = $matches[3] ?: $matches[6] ?: false; - - // strip the matching LIMIT clause out - $sql = str_replace( $matches[0], '', $sql ); - - return $this->limitResult( $sql, $row_count, $offset ); - } - - return $sql; - } - - /** - * @return string Wikitext of a link to the server software's web site - */ - public function getSoftwareLink() { - return "[{{int:version-db-mssql-url}} MS SQL Server]"; - } - - /** - * @return string Version information from the database - */ - public function getServerVersion() { - $server_info = sqlsrv_server_info( $this->conn ); - $version = $server_info['SQLServerVersion'] ?? 'Error'; - - return $version; - } - - /** - * @param string $table - * @param string $fname - * @return bool - */ - public function tableExists( $table, $fname = __METHOD__ ) { - list( $db, $schema, $table ) = $this->tableName( $table, 'split' ); - - if ( $db !== false ) { - // remote database - $this->queryLogger->error( "Attempting to call tableExists on a remote table" ); - return false; - } - - if ( $schema === false ) { - $schema = $this->dbSchema(); - } - - $res = $this->query( "SELECT 1 FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_TYPE = 'BASE TABLE' - AND TABLE_SCHEMA = '$schema' AND TABLE_NAME = '$table'" ); - - if ( $res->numRows() ) { - return true; - } else { - return false; - } - } - - /** - * Query whether a given column exists in the mediawiki schema - * @param string $table - * @param string $field - * @param string $fname - * @return bool - */ - public function fieldExists( $table, $field, $fname = __METHOD__ ) { - list( $db, $schema, $table ) = $this->tableName( $table, 'split' ); - - if ( $db !== false ) { - // remote database - $this->queryLogger->error( "Attempting to call fieldExists on a remote table" ); - return false; - } - - $res = $this->query( "SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS - WHERE TABLE_SCHEMA = '$schema' AND TABLE_NAME = '$table' AND COLUMN_NAME = '$field'" ); - - if ( $res->numRows() ) { - return true; - } else { - return false; - } - } - - public function fieldInfo( $table, $field ) { - list( $db, $schema, $table ) = $this->tableName( $table, 'split' ); - - if ( $db !== false ) { - // remote database - $this->queryLogger->error( "Attempting to call fieldInfo on a remote table" ); - return false; - } - - $res = $this->query( "SELECT * FROM INFORMATION_SCHEMA.COLUMNS - WHERE TABLE_SCHEMA = '$schema' AND TABLE_NAME = '$table' AND COLUMN_NAME = '$field'" ); - - $meta = $res->fetchRow(); - if ( $meta ) { - return new MssqlField( $meta ); - } - - return false; - } - - protected function doSavepoint( $identifier, $fname ) { - $this->query( 'SAVE TRANSACTION ' . $this->addIdentifierQuotes( $identifier ), $fname ); - } - - protected function doReleaseSavepoint( $identifier, $fname ) { - // Not supported. Also not really needed, a new doSavepoint() for the - // same identifier will overwrite the old. - } - - protected function doRollbackToSavepoint( $identifier, $fname ) { - $this->query( 'ROLLBACK TRANSACTION ' . $this->addIdentifierQuotes( $identifier ), $fname ); - } - - protected function doBegin( $fname = __METHOD__ ) { - if ( !sqlsrv_begin_transaction( $this->conn ) ) { - $this->reportQueryError( $this->lastError(), $this->lastErrno(), 'BEGIN', $fname ); - } - } - - /** - * End a transaction - * @param string $fname - */ - protected function doCommit( $fname = __METHOD__ ) { - if ( !sqlsrv_commit( $this->conn ) ) { - $this->reportQueryError( $this->lastError(), $this->lastErrno(), 'COMMIT', $fname ); - } - } - - /** - * Rollback a transaction. - * No-op on non-transactional databases. - * @param string $fname - */ - protected function doRollback( $fname = __METHOD__ ) { - if ( !sqlsrv_rollback( $this->conn ) ) { - $this->queryLogger->error( - "{fname}\t{db_server}\t{errno}\t{error}\t", - $this->getLogContext( [ - 'errno' => $this->lastErrno(), - 'error' => $this->lastError(), - 'fname' => $fname, - 'trace' => ( new RuntimeException() )->getTraceAsString() - ] ) - ); - } - } - - /** - * @param string $s - * @return string - */ - public function strencode( $s ) { - // Should not be called by us - return str_replace( "'", "''", $s ); - } - - /** - * @param string|int|null|bool|Blob $s - * @return string|int - */ - public function addQuotes( $s ) { - if ( $s instanceof MssqlBlob ) { - return $s->fetch(); - } elseif ( $s instanceof Blob ) { - // this shouldn't really ever be called, but it's here if needed - // (and will quite possibly make the SQL error out) - $blob = new MssqlBlob( $s->fetch() ); - return $blob->fetch(); - } else { - if ( is_bool( $s ) ) { - $s = $s ? 1 : 0; - } - return parent::addQuotes( $s ); - } - } - - /** - * @param string $s - * @return string - */ - public function addIdentifierQuotes( $s ) { - // http://msdn.microsoft.com/en-us/library/aa223962.aspx - return '[' . $s . ']'; - } - - /** - * @param string $name - * @return bool - */ - public function isQuotedIdentifier( $name ) { - return strlen( $name ) && $name[0] == '[' && substr( $name, -1, 1 ) == ']'; - } - - /** - * MS SQL supports more pattern operators than other databases (ex: [,],^) - * - * @param string $s - * @param string $escapeChar - * @return string - */ - protected function escapeLikeInternal( $s, $escapeChar = '`' ) { - return str_replace( [ $escapeChar, '%', '_', '[', ']', '^' ], - [ "{$escapeChar}{$escapeChar}", "{$escapeChar}%", "{$escapeChar}_", - "{$escapeChar}[", "{$escapeChar}]", "{$escapeChar}^" ], - $s ); - } - - protected function doSelectDomain( DatabaseDomain $domain ) { - if ( $domain->getSchema() !== null ) { - throw new DBExpectedError( - $this, - __CLASS__ . ": domain '{$domain->getId()}' has a schema component" - ); - } - - $database = $domain->getDatabase(); - if ( $database !== $this->getDBname() ) { - $sql = 'USE ' . $this->addIdentifierQuotes( $database ); - list( $res, $err, $errno ) = - $this->executeQuery( $sql, __METHOD__, self::QUERY_IGNORE_DBO_TRX ); - - if ( $res === false ) { - $this->reportQueryError( $err, $errno, $sql, __METHOD__ ); - return false; // unreachable - } - } - // Update that domain fields on success (no exception thrown) - $this->currentDomain = $domain; - - return true; - } - - /** - * @param array $options An associative array of options to be turned into - * an SQL query, valid keys are listed in the function. - * @return array - */ - public function makeSelectOptions( $options ) { - $tailOpts = ''; - $startOpts = ''; - - $noKeyOptions = []; - foreach ( $options as $key => $option ) { - if ( is_numeric( $key ) ) { - $noKeyOptions[$option] = true; - } - } - - $tailOpts .= $this->makeGroupByWithHaving( $options ); - - $tailOpts .= $this->makeOrderBy( $options ); - - if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) { - $startOpts .= 'DISTINCT'; - } - - if ( isset( $noKeyOptions['FOR XML'] ) ) { - // used in group concat field emulation - $tailOpts .= " FOR XML PATH('')"; - } - - // we want this to be compatible with the output of parent::makeSelectOptions() - return [ $startOpts, '', $tailOpts, '', '' ]; - } - - public function getType() { - return 'mssql'; - } - - /** - * @param array $stringList - * @return string - */ - public function buildConcat( $stringList ) { - return implode( ' + ', $stringList ); - } - - /** - * Build a GROUP_CONCAT or equivalent statement for a query. - * MS SQL doesn't have GROUP_CONCAT so we emulate it with other stuff (and boy is it nasty) - * - * This is useful for combining a field for several rows into a single string. - * NULL values will not appear in the output, duplicated values will appear, - * and the resulting delimiter-separated values have no defined sort order. - * Code using the results may need to use the PHP unique() or sort() methods. - * - * @param string $delim Glue to bind the results together - * @param string|array $table Table name - * @param string $field Field name - * @param string|array $conds Conditions - * @param string|array $join_conds Join conditions - * @return string SQL text - * @since 1.23 - */ - public function buildGroupConcatField( $delim, $table, $field, $conds = '', - $join_conds = [] - ) { - $gcsq = 'gcsq_' . $this->subqueryId; - $this->subqueryId++; - - $delimLen = strlen( $delim ); - $fld = "{$field} + {$this->addQuotes( $delim )}"; - $sql = "(SELECT LEFT({$field}, LEN({$field}) - {$delimLen}) FROM (" - . $this->selectSQLText( $table, $fld, $conds, null, [ 'FOR XML' ], $join_conds ) - . ") {$gcsq} ({$field}))"; - - return $sql; - } - - public function buildSubstring( $input, $startPosition, $length = null ) { - $this->assertBuildSubstringParams( $startPosition, $length ); - if ( $length === null ) { - /** - * MSSQL doesn't allow an empty length parameter, so when we don't want to limit the - * length returned use the default maximum size of text. - * @see https://docs.microsoft.com/en-us/sql/t-sql/statements/set-textsize-transact-sql - */ - $length = 2147483647; - } - return 'SUBSTRING(' . implode( ',', [ $input, $startPosition, $length ] ) . ')'; - } - - /** - * Returns an associative array for fields that are of type varbinary, binary, or image - * $table can be either a raw table name or passed through tableName() first - * @param string $table - * @return array - */ - private function getBinaryColumns( $table ) { - $tableRawArr = explode( '.', preg_replace( '#\[([^\]]*)\]#', '$1', $table ) ); - $tableRaw = array_pop( $tableRawArr ); - - if ( $this->binaryColumnCache === null ) { - $this->populateColumnCaches(); - } - - return $this->binaryColumnCache[$tableRaw] ?? []; - } - - /** - * @param string $table - * @return array - */ - private function getBitColumns( $table ) { - $tableRawArr = explode( '.', preg_replace( '#\[([^\]]*)\]#', '$1', $table ) ); - $tableRaw = array_pop( $tableRawArr ); - - if ( $this->bitColumnCache === null ) { - $this->populateColumnCaches(); - } - - return $this->bitColumnCache[$tableRaw] ?? []; - } - - private function populateColumnCaches() { - $res = $this->select( 'INFORMATION_SCHEMA.COLUMNS', '*', - [ - 'TABLE_CATALOG' => $this->getDBname(), - 'TABLE_SCHEMA' => $this->dbSchema(), - 'DATA_TYPE' => [ 'varbinary', 'binary', 'image', 'bit' ] - ] ); - - $this->binaryColumnCache = []; - $this->bitColumnCache = []; - foreach ( $res as $row ) { - if ( $row->DATA_TYPE == 'bit' ) { - $this->bitColumnCache[$row->TABLE_NAME][$row->COLUMN_NAME] = $row; - } else { - $this->binaryColumnCache[$row->TABLE_NAME][$row->COLUMN_NAME] = $row; - } - } - } - - /** - * @param string $name - * @param string $format One of "quoted" (default), "raw", or "split". - * @return string|array When the requested $format is "split", a list of database, schema, and - * table name is returned. Database and schema can be `false`. - */ - function tableName( $name, $format = 'quoted' ) { - # Replace reserved words with better ones - switch ( $name ) { - case 'user': - return $this->realTableName( 'mwuser', $format ); - default: - return $this->realTableName( $name, $format ); - } - } - - /** - * call this instead of tableName() in the updater when renaming tables - * @param string $name - * @param string $format One of "quoted" (default), "raw", or "split". - * @return string|array When the requested $format is "split", a list of database, schema, and - * table name is returned. Database and schema can be `false`. - * @private - */ - function realTableName( $name, $format = 'quoted' ) { - $table = parent::tableName( $name, $format ); - if ( $format == 'split' ) { - // Used internally, we want the schema split off from the table name and returned - // as a list with 3 elements (database, schema, table) - return array_pad( explode( '.', $table, 3 ), -3, false ); - } - return $table; - } - - /** - * Delete a table - * @param string $tableName - * @param string $fName - * @return bool|IResultWrapper - * @since 1.18 - */ - public function dropTable( $tableName, $fName = __METHOD__ ) { - if ( !$this->tableExists( $tableName, $fName ) ) { - return false; - } - - // parent function incorrectly appends CASCADE, which we don't want - $sql = "DROP TABLE " . $this->tableName( $tableName ); - - return $this->query( $sql, $fName ); - } - - /** - * Called in the installer and updater. - * Probably doesn't need to be called anywhere else in the codebase. - * @param bool|null $value - * @return bool|null - */ - public function prepareStatements( $value = null ) { - $old = $this->prepareStatements; - if ( $value !== null ) { - $this->prepareStatements = $value; - } - - return $old; - } - - /** - * Called in the installer and updater. - * Probably doesn't need to be called anywhere else in the codebase. - * @param bool|null $value - * @return bool|null - */ - public function scrollableCursor( $value = null ) { - $old = $this->scrollableCursor; - if ( $value !== null ) { - $this->scrollableCursor = $value; - } - - return $old; - } - - public function buildStringCast( $field ) { - return "CAST( $field AS NVARCHAR )"; - } - - public static function getAttributes() { - return [ self::ATTR_SCHEMAS_AS_TABLE_GROUPS => true ]; - } -} - -/** - * @deprecated since 1.29 - */ -class_alias( DatabaseMssql::class, 'DatabaseMssql' ); diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index a9223ac3b9..ac8c7c3105 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -814,22 +814,16 @@ abstract class DatabaseMysqlBase extends Database { protected function getHeartbeatData( array $conds ) { // Query time and trip time are not counted $nowUnix = microtime( true ); - // Do not bother starting implicit transactions here - $this->clearFlag( self::DBO_TRX, self::REMEMBER_PRIOR ); - try { - $whereSQL = $this->makeList( $conds, self::LIST_AND ); - // Use ORDER BY for channel based queries since that field might not be UNIQUE. - // Note: this would use "TIMESTAMPDIFF(MICROSECOND,ts,UTC_TIMESTAMP(6))" but the - // percision field is not supported in MySQL <= 5.5. - $res = $this->query( - "SELECT ts FROM heartbeat.heartbeat WHERE $whereSQL ORDER BY ts DESC LIMIT 1", - __METHOD__, - self::QUERY_SILENCE_ERRORS | self::QUERY_IGNORE_DBO_TRX - ); - $row = $res ? $res->fetchObject() : false; - } finally { - $this->restoreFlags(); - } + $whereSQL = $this->makeList( $conds, self::LIST_AND ); + // Use ORDER BY for channel based queries since that field might not be UNIQUE. + // Note: this would use "TIMESTAMPDIFF(MICROSECOND,ts,UTC_TIMESTAMP(6))" but the + // percision field is not supported in MySQL <= 5.5. + $res = $this->query( + "SELECT ts FROM heartbeat.heartbeat WHERE $whereSQL ORDER BY ts DESC LIMIT 1", + __METHOD__, + self::QUERY_SILENCE_ERRORS | self::QUERY_IGNORE_DBO_TRX + ); + $row = $res ? $res->fetchObject() : false; return [ $row ? $row->ts : null, $nowUnix ]; } diff --git a/includes/libs/rdbms/database/DatabaseMysqli.php b/includes/libs/rdbms/database/DatabaseMysqli.php index 4c189115d2..8931ae266e 100644 --- a/includes/libs/rdbms/database/DatabaseMysqli.php +++ b/includes/libs/rdbms/database/DatabaseMysqli.php @@ -40,15 +40,7 @@ class DatabaseMysqli extends DatabaseMysqlBase { * @return mysqli_result|bool */ protected function doQuery( $sql ) { - $conn = $this->getBindingHandle(); - - if ( $this->bufferResults() ) { - $ret = $conn->query( $sql ); - } else { - $ret = $conn->query( $sql, MYSQLI_USE_RESULT ); - } - - return $ret; + return $this->getBindingHandle()->query( $sql ); } /** @@ -64,9 +56,14 @@ class DatabaseMysqli extends DatabaseMysqlBase { ); } - // Other than mysql_connect, mysqli_real_connect expects an explicit port - // and socket parameters. So we need to parse the port and socket out of - // $realServer + // Other than mysql_connect, mysqli_real_connect expects an explicit port number + // e.g. "localhost:1234" or "127.0.0.1:1234" + // or Unix domain socket path + // e.g. "localhost:/socket_path" or "localhost:/foo/bar:bar:bar" + // colons are known to be used by Google AppEngine, + // see + // + // We need to parse the port or socket path out of $realServer $port = null; $socket = null; $hostAndPort = IP::splitHostAndPort( $realServer ); @@ -75,9 +72,9 @@ class DatabaseMysqli extends DatabaseMysqlBase { if ( $hostAndPort[1] ) { $port = $hostAndPort[1]; } - } elseif ( substr_count( $realServer, ':' ) == 1 ) { - // If we have a colon and something that's not a port number - // inside the hostname, assume it's the socket location + } elseif ( substr_count( $realServer, ':/' ) == 1 ) { + // If we have a colon slash instead of a colon and a port number + // after the ip or hostname, assume it's the Unix domain socket path list( $realServer, $socket ) = explode( ':', $realServer, 2 ); } diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php index a7ebc86e50..197cdcc196 100644 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -95,8 +95,8 @@ class DatabasePostgres extends Database { $this->password = $password; $connectVars = [ - // pg_connect() user $user as the default database. Since a database is required, - // then pick a "don't care" database that is more likely to exist than that one. + // A database must be specified in order to connect to Postgres. If $dbName is not + // specified, then use the standard "postgres" database that should exist by default. 'dbname' => strlen( $dbName ) ? $dbName : 'postgres', 'user' => $user, 'password' => $password @@ -1442,7 +1442,7 @@ SQL; return $row ? ( strtolower( $row->default_transaction_read_only ) === 'on' ) : false; } - public static function getAttributes() { + protected static function getAttributes() { return [ self::ATTR_SCHEMAS_AS_TABLE_GROUPS => true ]; } diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php index 97c4c9f235..8d417e659f 100644 --- a/includes/libs/rdbms/database/DatabaseSqlite.php +++ b/includes/libs/rdbms/database/DatabaseSqlite.php @@ -68,21 +68,21 @@ class DatabaseSqlite extends Database { * - dbDirectory : directory containing the DB and the lock file directory * - dbFilePath : use this to force the path of the DB file * - trxMode : one of (deferred, immediate, exclusive) - * @param array $p + * @param array $params */ - public function __construct( array $p ) { - if ( isset( $p['dbFilePath'] ) ) { - $this->dbPath = $p['dbFilePath']; - if ( !strlen( $p['dbname'] ) ) { - $p['dbname'] = self::generateDatabaseName( $this->dbPath ); + public function __construct( array $params ) { + if ( isset( $params['dbFilePath'] ) ) { + $this->dbPath = $params['dbFilePath']; + if ( !strlen( $params['dbname'] ) ) { + $params['dbname'] = self::generateDatabaseName( $this->dbPath ); } - } elseif ( isset( $p['dbDirectory'] ) ) { - $this->dbDir = $p['dbDirectory']; + } elseif ( isset( $params['dbDirectory'] ) ) { + $this->dbDir = $params['dbDirectory']; } - parent::__construct( $p ); + parent::__construct( $params ); - $this->trxMode = strtoupper( $p['trxMode'] ?? '' ); + $this->trxMode = strtoupper( $params['trxMode'] ?? '' ); $lockDirectory = $this->getLockFileDirectory(); if ( $lockDirectory !== null ) { @@ -96,7 +96,10 @@ class DatabaseSqlite extends Database { } protected static function getAttributes() { - return [ self::ATTR_DB_LEVEL_LOCKING => true ]; + return [ + self::ATTR_DB_IS_FILE => true, + self::ATTR_DB_LEVEL_LOCKING => true + ]; } /** @@ -269,28 +272,6 @@ class DatabaseSqlite extends Database { return preg_match( '/^(:memory:$|file:(:memory:|[^?]+\?mode=memory(&|$)))/', $path ); } - /** - * Check if the searchindext table is FTS enabled. - * @return bool False if not enabled. - */ - public function checkForEnabledSearch() { - if ( self::$fulltextEnabled === null ) { - self::$fulltextEnabled = false; - $table = $this->tableName( 'searchindex' ); - $res = $this->query( - "SELECT sql FROM sqlite_master WHERE tbl_name = '$table'", - __METHOD__, - self::QUERY_IGNORE_DBO_TRX - ); - if ( $res ) { - $row = $res->fetchRow(); - self::$fulltextEnabled = stristr( $row['sql'], 'fts' ) !== false; - } - } - - return self::$fulltextEnabled; - } - /** * Returns version of currently supported SQLite fulltext search module or false if none present. * @return string diff --git a/includes/libs/rdbms/database/IDatabase.php b/includes/libs/rdbms/database/IDatabase.php index 6b028679ee..a64078abd4 100644 --- a/includes/libs/rdbms/database/IDatabase.php +++ b/includes/libs/rdbms/database/IDatabase.php @@ -89,9 +89,9 @@ interface IDatabase { /** @var int Enable debug logging of all SQL queries */ const DBO_DEBUG = 1; - /** @var int Disable query buffering (only one result set can be iterated at a time) */ + /** @var int Unused since 1.34 */ const DBO_NOBUFFER = 2; - /** @var int Ignore query errors (internal use only!) */ + /** @var int Unused since 1.31 */ const DBO_IGNORE = 4; /** @var int Automatically start a transaction before running a query if none is active */ const DBO_TRX = 8; @@ -138,28 +138,6 @@ interface IDatabase { */ public function getServerInfo(); - /** - * Turns buffering of SQL result sets on (true) or off (false). Default is "on". - * - * Unbuffered queries are very troublesome in MySQL: - * - * - If another query is executed while the first query is being read - * out, the first query is killed. This means you can't call normal - * Database functions while you are reading an unbuffered query result - * from a normal Database connection. - * - * - Unbuffered queries cause the MySQL server to use large amounts of - * memory and to hold broad locks which block other queries. - * - * If you want to limit client-side memory, it's almost always better to - * split up queries into batches using a LIMIT clause than to switch off - * buffering. - * - * @param null|bool $buffer - * @return null|bool The previous value of the flag - */ - public function bufferResults( $buffer = null ); - /** * Gets the current transaction level. * @@ -319,7 +297,7 @@ interface IDatabase { /** * Set a flag for this connection * - * @param int $flag IDatabase::DBO_DEBUG, IDatabase::DBO_NOBUFFER, or IDatabase::DBO_TRX + * @param int $flag One of (IDatabase::DBO_DEBUG, IDatabase::DBO_TRX) * @param string $remember IDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING] */ public function setFlag( $flag, $remember = self::REMEMBER_NOTHING ); @@ -327,7 +305,7 @@ interface IDatabase { /** * Clear a flag for this connection * - * @param int $flag IDatabase::DBO_DEBUG, IDatabase::DBO_NOBUFFER, or IDatabase::DBO_TRX + * @param int $flag One of (IDatabase::DBO_DEBUG, IDatabase::DBO_TRX) * @param string $remember IDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING] */ public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING ); @@ -452,8 +430,10 @@ interface IDatabase { public function lastError(); /** - * Get the number of rows affected by the last write query - * @see https://www.php.net/mysql_affected_rows + * Get the number of rows affected by the last write query. + * Similar to https://www.php.net/mysql_affected_rows but includes rows matched + * but not changed (ie. an UPDATE which sets all fields to the same value they already have). + * To get the old mysql_affected_rows behavior, include non-equality of the fields in WHERE. * * @return int */ @@ -1102,8 +1082,9 @@ interface IDatabase { * * In systems like mysql/mariadb, different databases can easily be referenced on a single * connection merely by name, even in a single query via JOIN. On the other hand, Postgres - * treats databases as fully separate, only allowing mechanisms like postgres_fdw to - * effectively "mount" foreign DBs. This is true even among DBs on the same server. + * treats databases as logically separate, with different database users, requiring special + * mechanisms like postgres_fdw to "mount" foreign DBs. This is true even among DBs on the + * same server. Changing the selected database via selectDomain() requires a new connection. * * @return bool * @since 1.29 @@ -2052,11 +2033,11 @@ interface IDatabase { public function setSessionOptions( array $options ); /** - * Set variables to be used in sourceFile/sourceStream, in preference to the - * ones in $GLOBALS. If an array is set here, $GLOBALS will not be used at - * all. If it's set to false, $GLOBALS will be used. + * Set schema variables to be used when streaming commands from SQL files or stdin + * + * Variables appear as SQL comments and are substituted by their corresponding values * - * @param bool|array $vars Mapping variable name to value. + * @param array|null $vars Map of (variable => value) or null to use the defaults */ public function setSchemaVars( $vars ); diff --git a/includes/libs/rdbms/database/domain/DatabaseDomain.php b/includes/libs/rdbms/database/domain/DatabaseDomain.php index 5698cf824d..3ceb339b76 100644 --- a/includes/libs/rdbms/database/domain/DatabaseDomain.php +++ b/includes/libs/rdbms/database/domain/DatabaseDomain.php @@ -23,7 +23,19 @@ namespace Wikimedia\Rdbms; use InvalidArgumentException; /** - * Class to handle database/prefix specification for IDatabase domains + * Class to handle database/schema/prefix specifications for IDatabase + * + * The components of a database domain are defined as follows: + * - database: name of a server-side collection of schemas that is client-selectable + * - schema: name of a server-side collection of tables within the given database + * - prefix: table name prefix of an application-defined table collection + * + * If an RDBMS does not support server-side collections of table collections (schemas) then + * the schema component should be null and the "database" component treated as a collection + * of exactly one table collection (the implied schema for that "database"). + * + * The above criteria should determine how components should map to RDBMS specific keywords + * rather than "database"/"schema" always mapping to "DATABASE"/"SCHEMA" as used by the RDBMS. */ class DatabaseDomain { /** @var string|null */ diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index 77467f062a..9efb1ade67 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -155,8 +155,9 @@ abstract class LBFactory implements ILBFactory { $this->defaultGroup = $conf['defaultGroup'] ?? null; $this->secret = $conf['secret'] ?? ''; - $this->id = mt_rand(); - $this->ticket = mt_rand(); + static $nextId, $nextTicket; + $this->id = $nextId = ( is_int( $nextId ) ? $nextId++ : mt_rand() ); + $this->ticket = $nextTicket = ( is_int( $nextTicket ) ? $nextTicket++ : mt_rand() ); } public function destroy() { diff --git a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php b/includes/libs/rdbms/lbfactory/LBFactoryMulti.php index f675b58778..1a3495e4ac 100644 --- a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php +++ b/includes/libs/rdbms/lbfactory/LBFactoryMulti.php @@ -312,13 +312,11 @@ class LBFactoryMulti extends LBFactory { foreach ( $loads as $serverName => $load ) { $serverInfo = $template; if ( $master ) { - $serverInfo['master'] = true; if ( $this->masterTemplateOverrides ) { $serverInfo = $this->masterTemplateOverrides + $serverInfo; } $master = false; } else { - $serverInfo['replica'] = true; } if ( isset( $this->templateOverridesByServer[$serverName] ) ) { $serverInfo = $this->templateOverridesByServer[$serverName] + $serverInfo; diff --git a/includes/libs/rdbms/lbfactory/LBFactorySimple.php b/includes/libs/rdbms/lbfactory/LBFactorySimple.php index fd76d88dd0..eb4780288e 100644 --- a/includes/libs/rdbms/lbfactory/LBFactorySimple.php +++ b/includes/libs/rdbms/lbfactory/LBFactorySimple.php @@ -58,14 +58,6 @@ class LBFactorySimple extends LBFactory { parent::__construct( $conf ); $this->servers = $conf['servers'] ?? []; - foreach ( $this->servers as $i => $server ) { - if ( $i == 0 ) { - $this->servers[$i]['master'] = true; - } else { - $this->servers[$i]['replica'] = true; - } - } - $this->externalClusters = $conf['externalClusters'] ?? []; $this->loadMonitorClass = $conf['loadMonitorClass'] ?? 'LoadMonitor'; } diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php index 990705c45f..112557257f 100644 --- a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php @@ -167,8 +167,7 @@ interface ILoadBalancer { * * @param string|bool $group Query group or false for the generic group * @param string|bool $domain DB domain ID or false for the local domain - * @throws DBError If no live handle can be obtained - * @return bool|int|string + * @return int|bool Returns false if no live handle can be obtained */ public function getReaderIndex( $group = false, $domain = false ); diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php b/includes/libs/rdbms/loadbalancer/LoadBalancer.php index 98607ce807..955e3d83af 100644 --- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php @@ -121,6 +121,8 @@ class LoadBalancer implements ILoadBalancer { /** @var bool Whether any connection has been attempted yet */ private $connectionAttempted = false; + /** var int An identifier for this class instance */ + private $id; /** @var int|null Integer ID of the managing LBFactory instance or null if none */ private $ownerId; /** @var string|bool Explicit DBO_TRX transaction round active or false if none */ @@ -171,11 +173,6 @@ class LoadBalancer implements ILoadBalancer { if ( ++$listKey !== $i ) { throw new UnexpectedValueException( 'List expected for "servers" parameter' ); } - if ( $i == 0 ) { - $server['master'] = true; - } else { - $server['replica'] = true; - } $this->servers[$i] = $server; foreach ( ( $server['groupLoads'] ?? [] ) as $group => $ratio ) { $this->groupLoads[$group][$i] = $ratio; @@ -238,6 +235,8 @@ class LoadBalancer implements ILoadBalancer { $group = $params['defaultGroup'] ?? self::GROUP_GENERIC; $this->defaultGroup = isset( $this->groupLoads[$group] ) ? $group : self::GROUP_GENERIC; + static $nextId; + $this->id = $nextId = ( is_int( $nextId ) ? $nextId++ : mt_rand() ); $this->ownerId = $params['ownerId'] ?? null; } @@ -592,8 +591,7 @@ class LoadBalancer implements ILoadBalancer { $this->connLogger->debug( __METHOD__ . ": Using reader #$i: $serverName..." ); // Get a connection to this server without triggering other server connections - $flags = self::CONN_SILENCE_ERRORS; - $conn = $this->getServerConnection( $i, $domain, $flags ); + $conn = $this->getServerConnection( $i, $domain, self::CONN_SILENCE_ERRORS ); if ( !$conn ) { $this->connLogger->warning( __METHOD__ . ": Failed connecting to $i/$domain" ); unset( $currentLoads[$i] ); // avoid this server next iteration @@ -958,17 +956,7 @@ class LoadBalancer implements ILoadBalancer { $serverIndex = $conn->getLBInfo( 'serverIndex' ); $refCount = $conn->getLBInfo( 'foreignPoolRefCount' ); if ( $serverIndex === null || $refCount === null ) { - /** - * This can happen in code like: - * foreach ( $dbs as $db ) { - * $conn = $lb->getConnection( $lb::DB_REPLICA, [], $db ); - * ... - * $lb->reuseConnection( $conn ); - * } - * When a connection to the local DB is opened in this way, reuseConnection() - * should be ignored - */ - return; + return; // non-foreign connection; no domain-use tracking to update } elseif ( $conn instanceof DBConnRef ) { // DBConnRef already handles calling reuseConnection() and only passes the live // Database instance to this method. Any caller passing in a DBConnRef is broken. @@ -1065,47 +1053,45 @@ class LoadBalancer implements ILoadBalancer { * * @note If disable() was called on this LoadBalancer, this method will throw a DBAccessError. * - * @param int $i Server index + * @param int $i Specific server index * @param int $flags Class CONN_* constant bitfield * @return Database * @throws InvalidArgumentException When the server index is invalid * @throws UnexpectedValueException When the DB domain of the connection is corrupted */ private function getLocalConnection( $i, $flags = 0 ) { + $autoCommit = ( ( $flags & self::CONN_TRX_AUTOCOMMIT ) == self::CONN_TRX_AUTOCOMMIT ); // Connection handles required to be in auto-commit mode use a separate connection // pool since the main pool is effected by implicit and explicit transaction rounds - $autoCommit = ( ( $flags & self::CONN_TRX_AUTOCOMMIT ) == self::CONN_TRX_AUTOCOMMIT ); - $connKey = $autoCommit ? self::KEY_LOCAL_NOROUND : self::KEY_LOCAL; + if ( isset( $this->conns[$connKey][$i][0] ) ) { $conn = $this->conns[$connKey][$i][0]; } else { - // Open a new connection - $server = $this->getServerInfoStrict( $i ); - $server['serverIndex'] = $i; - $server['autoCommitOnly'] = $autoCommit; - $conn = $this->reallyOpenConnection( $server, $this->localDomain ); - $host = $this->getServerName( $i ); + $conn = $this->reallyOpenConnection( + $i, + $this->localDomain, + [ 'autoCommitOnly' => $autoCommit ] + ); if ( $conn->isOpen() ) { - $this->connLogger->debug( - __METHOD__ . ": connected to database $i at '$host'." ); + $this->connLogger->debug( __METHOD__ . ": opened new connection for $i" ); $this->conns[$connKey][$i][0] = $conn; } else { - $this->connLogger->warning( - __METHOD__ . ": failed to connect to database $i at '$host'." ); + $this->connLogger->warning( __METHOD__ . ": connection error for $i" ); $this->errorConnection = $conn; $conn = false; } } - // Final sanity check to make sure the right domain is selected + // Sanity check to make sure that the right domain is selected if ( $conn instanceof IDatabase && !$this->localDomain->isCompatible( $conn->getDomainID() ) ) { throw new UnexpectedValueException( "Got connection to '{$conn->getDomainID()}', " . - "but expected local domain ('{$this->localDomain}')" ); + "but expected local domain ('{$this->localDomain}')" + ); } return $conn; @@ -1127,7 +1113,7 @@ class LoadBalancer implements ILoadBalancer { * * @note If disable() was called on this LoadBalancer, this method will throw a DBAccessError. * - * @param int $i Server index + * @param int $i Specific server index * @param string $domain Domain ID to open * @param int $flags Class CONN_* constant bitfield * @return Database|bool Returns false on connection error @@ -1137,10 +1123,9 @@ class LoadBalancer implements ILoadBalancer { */ private function getForeignConnection( $i, $domain, $flags = 0 ) { $domainInstance = DatabaseDomain::newFromId( $domain ); + $autoCommit = ( ( $flags & self::CONN_TRX_AUTOCOMMIT ) == self::CONN_TRX_AUTOCOMMIT ); // Connection handles required to be in auto-commit mode use a separate connection // pool since the main pool is effected by implicit and explicit transaction rounds - $autoCommit = ( ( $flags & self::CONN_TRX_AUTOCOMMIT ) == self::CONN_TRX_AUTOCOMMIT ); - if ( $autoCommit ) { $connFreeKey = self::KEY_FOREIGN_FREE_NOROUND; $connInUseKey = self::KEY_FOREIGN_INUSE_NOROUND; @@ -1193,26 +1178,28 @@ class LoadBalancer implements ILoadBalancer { } if ( !$conn ) { - // Open a new connection - $server = $this->getServerInfoStrict( $i ); - $server['serverIndex'] = $i; - $server['foreignPoolRefCount'] = 0; - $server['foreign'] = true; - $server['autoCommitOnly'] = $autoCommit; - $conn = $this->reallyOpenConnection( $server, $domainInstance ); - if ( !$conn->isOpen() ) { - $this->connLogger->warning( __METHOD__ . ": connection error for $i/$domain" ); - $this->errorConnection = $conn; - $conn = false; - } else { + $conn = $this->reallyOpenConnection( + $i, + $domainInstance, + [ + 'autoCommitOnly' => $autoCommit, + 'foreign' => true, + 'foreignPoolRefCount' => 0 + ] + ); + if ( $conn->isOpen() ) { // Note that if $domain is an empty string, getDomainID() might not match it $this->conns[$connInUseKey][$i][$conn->getDomainID()] = $conn; $this->connLogger->debug( __METHOD__ . ": opened new connection for $i/$domain" ); + } else { + $this->connLogger->warning( __METHOD__ . ": connection error for $i/$domain" ); + $this->errorConnection = $conn; + $conn = false; } } if ( $conn instanceof IDatabase ) { - // Final sanity check to make sure the right domain is selected + // Sanity check to make sure that the right domain is selected if ( !$domainInstance->isCompatible( $conn->getDomainID() ) ) { throw new UnexpectedValueException( "Got connection to '{$conn->getDomainID()}', but expected '$domain'" ); @@ -1247,94 +1234,101 @@ class LoadBalancer implements ILoadBalancer { * * Returns a Database object whether or not the connection was successful. * - * @param array $server + * @param int $i Specific server index * @param DatabaseDomain $domain Domain the connection is for, possibly unspecified + * @param array $lbInfo Additional information for setLBInfo() * @return Database * @throws DBAccessError * @throws InvalidArgumentException */ - protected function reallyOpenConnection( array $server, DatabaseDomain $domain ) { + protected function reallyOpenConnection( $i, DatabaseDomain $domain, array $lbInfo ) { if ( $this->disabled ) { throw new DBAccessError(); } - if ( $domain->getDatabase() === null ) { - // The database domain does not specify a DB name and some database systems require a - // valid DB specified on connection. The $server configuration array contains a default - // DB name to use for connections in such cases. - if ( $server['type'] === 'mysql' ) { - // For MySQL, DATABASE and SCHEMA are synonyms, connections need not specify a DB, - // and the DB name in $server might not exist due to legacy reasons (the default - // domain used to ignore the local LB domain, even when mismatched). - $server['dbname'] = null; - } - } else { - $server['dbname'] = $domain->getDatabase(); - } - - if ( $domain->getSchema() !== null ) { - $server['schema'] = $domain->getSchema(); - } - - // It is always possible to connect with any prefix, even the empty string - $server['tablePrefix'] = $domain->getTablePrefix(); - - // Let the handle know what the cluster master is (e.g. "db1052") - $masterName = $this->getServerName( $this->getWriterIndex() ); - $server['clusterMasterHost'] = $masterName; - - $server['srvCache'] = $this->srvCache; - // Set loggers and profilers - $server['connLogger'] = $this->connLogger; - $server['queryLogger'] = $this->queryLogger; - $server['errorLogger'] = $this->errorLogger; - $server['deprecationLogger'] = $this->deprecationLogger; - $server['profiler'] = $this->profiler; - $server['trxProfiler'] = $this->trxProfiler; - // Use the same agent and PHP mode for all DB handles - $server['cliMode'] = $this->cliMode; - $server['agent'] = $this->agent; - // Use DBO_DEFAULT flags by default for LoadBalancer managed databases. Assume that the - // application calls LoadBalancer::commitMasterChanges() before the PHP script completes. - $server['flags'] = $server['flags'] ?? IDatabase::DBO_DEFAULT; - - // Create a live connection object + $server = $this->getServerInfoStrict( $i ); + $server = array_merge( $server, [ + // Use the database specified in $domain (null means "none or entrypoint DB"); + // fallback to the $server default if the RDBMs is an embedded library using a file + // on disk since there would be nothing to access to without a DB/file name. + 'dbname' => $this->getServerAttributes( $i )[Database::ATTR_DB_IS_FILE] + ? ( $domain->getDatabase() ?? $server['dbname'] ?? null ) + : $domain->getDatabase(), + // Override the $server default schema with that of $domain if specified + 'schema' => $domain->getSchema() ?? $server['schema'] ?? null, + // Use the table prefix specified in $domain + 'tablePrefix' => $domain->getTablePrefix(), + // Participate in transaction rounds if $server does not specify otherwise + 'flags' => $server['flags'] ?? IDatabase::DBO_DEFAULT, + // Inject the PHP execution mode and the agent string + 'cliMode' => $this->cliMode, + 'agent' => $this->agent, + // Inject object and callback dependencies + 'srvCache' => $this->srvCache, + 'connLogger' => $this->connLogger, + 'queryLogger' => $this->queryLogger, + 'errorLogger' => $this->errorLogger, + 'deprecationLogger' => $this->deprecationLogger, + 'profiler' => $this->profiler, + 'trxProfiler' => $this->trxProfiler + ] ); + + $lbInfo = array_merge( $lbInfo, [ + 'ownerId' => $this->id, + 'serverIndex' => $i, + 'master' => ( $i === $this->getWriterIndex() ), + 'replica' => ( $i !== $this->getWriterIndex() ), + // Name of the master server of the relevant DB cluster (e.g. "db1052") + 'clusterMasterHost' => $this->getServerName( $this->getWriterIndex() ) + ] ); + + $conn = Database::factory( $server['type'], $server, Database::NEW_UNCONNECTED ); try { - $db = Database::factory( $server['type'], $server ); - // Log when many connection are made on requests + $conn->initConnection(); ++$this->connectionCounter; - $currentConnCount = $this->getCurrentConnectionCount(); - if ( $currentConnCount >= self::CONN_HELD_WARN_THRESHOLD ) { - $this->perfLogger->warning( - __METHOD__ . ": {connections}+ connections made (master={masterdb})", - [ 'connections' => $currentConnCount, 'masterdb' => $masterName ] - ); - } } catch ( DBConnectionError $e ) { - // FIXME: This is probably the ugliest thing I have ever done to - // PHP. I'm half-expecting it to segfault, just out of disgust. -- TS - $db = $e->db; + // ignore; let the DB handle the logging } - $db->setLBInfo( $server ); - $db->setLazyMasterHandle( - $this->getLazyConnectionRef( self::DB_MASTER, [], $db->getDomainID() ) - ); - $db->setTableAliases( $this->tableAliases ); - $db->setIndexAliases( $this->indexAliases ); - - if ( $server['serverIndex'] === $this->getWriterIndex() ) { + $conn->setLBInfo( $lbInfo ); + if ( $conn->getFlag( $conn::DBO_DEFAULT ) ) { + if ( $this->cliMode ) { + $conn->clearFlag( $conn::DBO_TRX ); + } else { + $conn->setFlag( $conn::DBO_TRX ); + } + } + if ( $i === $this->getWriterIndex() ) { if ( $this->trxRoundId !== false ) { - $this->applyTransactionRoundFlags( $db ); + $this->applyTransactionRoundFlags( $conn ); } foreach ( $this->trxRecurringCallbacks as $name => $callback ) { - $db->setTransactionListener( $name, $callback ); + $conn->setTransactionListener( $name, $callback ); } } + $conn->setTableAliases( $this->tableAliases ); + $conn->setIndexAliases( $this->indexAliases ); + + $conn->setLazyMasterHandle( + $this->getLazyConnectionRef( self::DB_MASTER, [], $conn->getDomainID() ) + ); $this->lazyLoadReplicationPositions(); // session consistency - return $db; + // Log when many connection are made on requests + $count = $this->getCurrentConnectionCount(); + if ( $count >= self::CONN_HELD_WARN_THRESHOLD ) { + $this->perfLogger->warning( + __METHOD__ . ": {connections}+ connections made (master={masterdb})", + [ + 'connections' => $count, + 'dbserver' => $conn->getServer(), + 'masterdb' => $conn->getLBInfo( 'clusterMasterHost' ) + ] + ); + } + + return $conn; } /** @@ -1919,13 +1913,8 @@ class LoadBalancer implements ILoadBalancer { } if ( $this->hasStreamingReplicaServers() ) { - try { - // Set "laggedReplicaMode" - $this->getReaderIndex( self::GROUP_GENERIC, $domain ); - } catch ( DBConnectionError $e ) { - // Sanity: avoid expensive re-connect attempts and failures - $this->laggedReplicaMode = true; - } + // This will set "laggedReplicaMode" as needed + $this->getReaderIndex( self::GROUP_GENERIC, $domain ); } return $this->laggedReplicaMode; @@ -2115,8 +2104,8 @@ class LoadBalancer implements ILoadBalancer { public function waitForMasterPos( IDatabase $conn, $pos = false, $timeout = null ) { $timeout = max( 1, $timeout ?: $this->waitTimeout ); - if ( $this->getServerCount() <= 1 || !$conn->getLBInfo( 'replica' ) ) { - return true; // server is not a replica DB + if ( $conn->getLBInfo( 'serverIndex' ) === $this->getWriterIndex() ) { + return true; // not a replica DB server } if ( !$pos ) { @@ -2232,9 +2221,9 @@ class LoadBalancer implements ILoadBalancer { ) ); // Update the prefix for all local connections... - $this->forEachOpenConnection( function ( IDatabase $db ) use ( $prefix ) { - if ( !$db->getLBInfo( 'foreign' ) ) { - $db->tablePrefix( $prefix ); + $this->forEachOpenConnection( function ( IDatabase $conn ) use ( $prefix ) { + if ( !$conn->getLBInfo( 'foreign' ) ) { + $conn->tablePrefix( $prefix ); } } ); } diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php b/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php index 4c68833e7e..2ad24b95d0 100644 --- a/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php +++ b/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php @@ -83,7 +83,7 @@ class LoadBalancerSingle extends LoadBalancer { ) ); } - protected function reallyOpenConnection( array $server, DatabaseDomain $domain ) { + protected function reallyOpenConnection( $i, DatabaseDomain $domain, array $lbInfo = [] ) { return $this->db; } diff --git a/includes/libs/services/ServiceContainer.php b/includes/libs/services/ServiceContainer.php index d1f10524d5..84755edb90 100644 --- a/includes/libs/services/ServiceContainer.php +++ b/includes/libs/services/ServiceContainer.php @@ -6,6 +6,7 @@ use InvalidArgumentException; use Psr\Container\ContainerInterface; use RuntimeException; use Wikimedia\Assert\Assert; +use Wikimedia\ScopedCallback; /** * Generic service container. @@ -77,6 +78,11 @@ class ServiceContainer implements ContainerInterface, DestructibleService { */ private $destroyed = false; + /** + * @var array Set of services currently being created, to detect loops + */ + private $servicesBeingCreated = []; + /** * @param array $extraInstantiationParams Any additional parameters to be passed to the * instantiator function when creating a service. This is typically used to provide @@ -433,10 +439,20 @@ class ServiceContainer implements ContainerInterface, DestructibleService { * @param string $name * * @throws InvalidArgumentException if $name is not a known service. + * @throws RuntimeException if a circular dependency is detected. * @return object */ private function createService( $name ) { if ( isset( $this->serviceInstantiators[$name] ) ) { + if ( isset( $this->servicesBeingCreated[$name] ) ) { + throw new RuntimeException( "Circular dependency when creating service! " . + implode( ' -> ', array_keys( $this->servicesBeingCreated ) ) . " -> $name" ); + } + $this->servicesBeingCreated[$name] = true; + $removeFromStack = new ScopedCallback( function () use ( $name ) { + unset( $this->servicesBeingCreated[$name] ); + } ); + $service = ( $this->serviceInstantiators[$name] )( $this, ...$this->extraInstantiationParams @@ -458,6 +474,8 @@ class ServiceContainer implements ContainerInterface, DestructibleService { } } + $removeFromStack->consume(); + // NOTE: when adding more wiring logic here, make sure importWiring() is kept in sync! } else { throw new NoSuchServiceException( $name ); diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index 17f72bd574..ce68a91897 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -59,7 +59,7 @@ interface LogEntry { public function getParameters(); /** - * Get the user for performed this action. + * Get the user who performed this action. * * @return User */ diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index e66bd69cd5..66be436da4 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -565,7 +565,9 @@ class LogEventsList extends ContextSource { } $permissionlist = implode( ', ', $permissions ); wfDebug( "Checking for $permissionlist due to $field match on $bitfield\n" ); - return $user->isAllowedAny( ...$permissions ); + return MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasAnyRight( $user, ...$permissions ); } return true; } diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php index 4ecc368d4e..15b149e134 100644 --- a/includes/logging/LogPager.php +++ b/includes/logging/LogPager.php @@ -23,6 +23,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * @ingroup Pager */ @@ -462,7 +464,10 @@ class LogPager extends ReverseChronologicalPager { $user = $this->getUser(); if ( !$user->isAllowed( 'deletedhistory' ) ) { $this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::DELETED_ACTION ) . ' = 0'; - } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) + ) { $this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::SUPPRESSED_ACTION ) . ' != ' . LogPage::SUPPRESSED_USER; } @@ -480,7 +485,10 @@ class LogPager extends ReverseChronologicalPager { $user = $this->getUser(); if ( !$user->isAllowed( 'deletedhistory' ) ) { $this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::DELETED_USER ) . ' = 0'; - } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) + ) { $this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::SUPPRESSED_USER ) . ' != ' . LogPage::SUPPRESSED_ACTION; } diff --git a/includes/media/ThumbnailImage.php b/includes/media/ThumbnailImage.php index 7ee6dcbee3..6e4412ca8f 100644 --- a/includes/media/ThumbnailImage.php +++ b/includes/media/ThumbnailImage.php @@ -110,7 +110,7 @@ class ThumbnailImage extends MediaTransformOutput { * @return string */ function toHtml( $options = [] ) { - global $wgPriorityHints, $wgPriorityHintsRatio, $wgElementTiming; + global $wgPriorityHints, $wgPriorityHintsRatio, $wgElementTiming, $wgNativeImageLazyLoading; if ( func_num_args() == 2 ) { throw new MWException( __METHOD__ . ' called in the old style' ); @@ -126,6 +126,10 @@ class ThumbnailImage extends MediaTransformOutput { 'decoding' => 'async', ]; + if ( $wgNativeImageLazyLoading ) { + $attribs['loading'] = 'lazy'; + } + $elementTimingName = 'thumbnail'; if ( $wgPriorityHints diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php index ffbc3783c4..ad0f67e590 100644 --- a/includes/objectcache/ObjectCache.php +++ b/includes/objectcache/ObjectCache.php @@ -119,7 +119,7 @@ class ObjectCache { * @return BagOStuff * @throws InvalidArgumentException */ - public static function newFromId( $id ) { + private static function newFromId( $id ) { global $wgObjectCaches; if ( !isset( $wgObjectCaches[$id] ) ) { @@ -146,7 +146,7 @@ class ObjectCache { * * @return string */ - public static function getDefaultKeyspace() { + private static function getDefaultKeyspace() { global $wgCachePrefix; $keyspace = $wgCachePrefix; @@ -178,7 +178,8 @@ class ObjectCache { } elseif ( isset( $params['class'] ) ) { $class = $params['class']; // Automatically set the 'async' update handler - $params['asyncHandler'] = $params['asyncHandler'] ?? 'DeferredUpdates::addCallableUpdate'; + $params['asyncHandler'] = $params['asyncHandler'] + ?? [ DeferredUpdates::class, 'addCallableUpdate' ]; // Enable reportDupes by default $params['reportDupes'] = $params['reportDupes'] ?? true; // Do b/c logic for SqlBagOStuff @@ -296,7 +297,7 @@ class ObjectCache { * @return WANObjectCache * @throws UnexpectedValueException */ - public static function newWANCacheFromId( $id ) { + private static function newWANCacheFromId( $id ) { global $wgWANObjectCaches, $wgObjectCaches; if ( !isset( $wgWANObjectCaches[$id] ) ) { diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index e97dc41af7..db4838f032 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -22,6 +22,7 @@ */ use MediaWiki\MediaWikiServices; +use Wikimedia\AtEase\AtEase; use Wikimedia\Rdbms\Database; use Wikimedia\Rdbms\IDatabase; use Wikimedia\Rdbms\DBError; @@ -43,7 +44,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { /** @var string[] (server index => tag/host name) */ protected $serverTags; /** @var int */ - protected $numServers; + protected $numServerShards; /** @var int UNIX timestamp */ protected $lastGarbageCollect = 0; /** @var int */ @@ -51,7 +52,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { /** @var int */ protected $purgeLimit = 100; /** @var int */ - protected $shards = 1; + protected $numTableShards = 1; /** @var string */ protected $tableName = 'objectcache'; /** @var bool */ @@ -126,7 +127,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { if ( isset( $params['servers'] ) ) { $this->serverInfos = []; $this->serverTags = []; - $this->numServers = count( $params['servers'] ); + $this->numServerShards = count( $params['servers'] ); $index = 0; foreach ( $params['servers'] as $tag => $info ) { $this->serverInfos[$index] = $info; @@ -139,11 +140,11 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { } } elseif ( isset( $params['server'] ) ) { $this->serverInfos = [ $params['server'] ]; - $this->numServers = count( $this->serverInfos ); + $this->numServerShards = count( $this->serverInfos ); } else { // Default to using the main wiki's database servers $this->serverInfos = false; - $this->numServers = 1; + $this->numServerShards = 1; $this->attrMap[self::ATTR_SYNCWRITES] = self::QOS_SYNCWRITES_BE; } if ( isset( $params['purgePeriod'] ) ) { @@ -156,7 +157,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { $this->tableName = $params['tableName']; } if ( isset( $params['shards'] ) ) { - $this->shards = intval( $params['shards'] ); + $this->numTableShards = intval( $params['shards'] ); } // Backwards-compatibility for < 1.34 $this->replicaOnly = $params['replicaOnly'] ?? ( $params['slaveOnly'] ?? false ); @@ -165,35 +166,35 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { /** * Get a connection to the specified database * - * @param int $serverIndex + * @param int $shardIndex * @return IMaintainableDatabase * @throws MWException */ - protected function getDB( $serverIndex ) { - if ( $serverIndex >= $this->numServers ) { - throw new MWException( __METHOD__ . ": Invalid server index \"$serverIndex\"" ); + private function getConnection( $shardIndex ) { + if ( $shardIndex >= $this->numServerShards ) { + throw new MWException( __METHOD__ . ": Invalid server index \"$shardIndex\"" ); } # Don't keep timing out trying to connect for each call if the DB is down if ( - isset( $this->connFailureErrors[$serverIndex] ) && - ( $this->getCurrentTime() - $this->connFailureTimes[$serverIndex] ) < 60 + isset( $this->connFailureErrors[$shardIndex] ) && + ( $this->getCurrentTime() - $this->connFailureTimes[$shardIndex] ) < 60 ) { - throw $this->connFailureErrors[$serverIndex]; + throw $this->connFailureErrors[$shardIndex]; } if ( $this->serverInfos ) { - if ( !isset( $this->conns[$serverIndex] ) ) { + if ( !isset( $this->conns[$shardIndex] ) ) { // Use custom database defined by server connection info - $info = $this->serverInfos[$serverIndex]; + $info = $this->serverInfos[$shardIndex]; $type = $info['type'] ?? 'mysql'; $host = $info['host'] ?? '[unknown]'; $this->logger->debug( __CLASS__ . ": connecting to $host" ); $db = Database::factory( $type, $info ); $db->clearFlag( DBO_TRX ); // auto-commit mode - $this->conns[$serverIndex] = $db; + $this->conns[$shardIndex] = $db; } - $db = $this->conns[$serverIndex]; + $db = $this->conns[$shardIndex]; } else { // Use the main LB database $lb = MediaWikiServices::getInstance()->getDBLoadBalancer(); @@ -218,22 +219,22 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * @param string $key * @return array Server index and table name */ - protected function getTableByKey( $key ) { - if ( $this->shards > 1 ) { + private function getTableByKey( $key ) { + if ( $this->numTableShards > 1 ) { $hash = hexdec( substr( md5( $key ), 0, 8 ) ) & 0x7fffffff; - $tableIndex = $hash % $this->shards; + $tableIndex = $hash % $this->numTableShards; } else { $tableIndex = 0; } - if ( $this->numServers > 1 ) { + if ( $this->numServerShards > 1 ) { $sortedServers = $this->serverTags; ArrayUtils::consistentHashSort( $sortedServers, $key ); reset( $sortedServers ); - $serverIndex = key( $sortedServers ); + $shardIndex = key( $sortedServers ); } else { - $serverIndex = 0; + $shardIndex = 0; } - return [ $serverIndex, $this->getTableNameByShard( $tableIndex ) ]; + return [ $shardIndex, $this->getTableNameByShard( $tableIndex ) ]; } /** @@ -241,9 +242,9 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * @param int $index * @return string */ - protected function getTableNameByShard( $index ) { - if ( $this->shards > 1 ) { - $decimals = strlen( $this->shards - 1 ); + private function getTableNameByShard( $index ) { + if ( $this->numTableShards > 1 ) { + $decimals = strlen( $this->numTableShards - 1 ); return $this->tableName . sprintf( "%0{$decimals}d", $index ); } else { @@ -278,19 +279,19 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { return $values; } - protected function fetchBlobMulti( array $keys, $flags = 0 ) { + private function fetchBlobMulti( array $keys, $flags = 0 ) { $values = []; // array of (key => value) $keysByTable = []; foreach ( $keys as $key ) { - list( $serverIndex, $tableName ) = $this->getTableByKey( $key ); - $keysByTable[$serverIndex][$tableName][] = $key; + list( $shardIndex, $tableName ) = $this->getTableByKey( $key ); + $keysByTable[$shardIndex][$tableName][] = $key; } $dataRows = []; - foreach ( $keysByTable as $serverIndex => $serverKeys ) { + foreach ( $keysByTable as $shardIndex => $serverKeys ) { try { - $db = $this->getDB( $serverIndex ); + $db = $this->getConnection( $shardIndex ); foreach ( $serverKeys as $tableName => $tableKeys ) { $res = $db->select( $tableName, [ 'keyname', 'value', 'exptime' ], @@ -305,13 +306,13 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { continue; } foreach ( $res as $row ) { - $row->serverIndex = $serverIndex; + $row->shardIndex = $shardIndex; $row->tableName = $tableName; $dataRows[$row->keyname] = $row; } } } catch ( DBError $e ) { - $this->handleReadError( $e, $serverIndex ); + $this->handleReadError( $e, $shardIndex ); } } @@ -321,14 +322,14 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { $this->debug( "get: retrieved data; expiry time is " . $row->exptime ); $db = null; // in case of connection failure try { - $db = $this->getDB( $row->serverIndex ); + $db = $this->getConnection( $row->shardIndex ); if ( $this->isExpired( $db, $row->exptime ) ) { // MISS $this->debug( "get: key has expired" ); } else { // HIT $values[$key] = $db->decodeBlob( $row->value ); } } catch ( DBQueryError $e ) { - $this->handleWriteError( $e, $db, $row->serverIndex ); + $this->handleWriteError( $e, $db, $row->shardIndex ); } } else { // MISS $this->debug( 'get: no matching rows' ); @@ -352,8 +353,8 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { private function modifyMulti( array $data, $exptime, $flags, $op ) { $keysByTable = []; foreach ( $data as $key => $value ) { - list( $serverIndex, $tableName ) = $this->getTableByKey( $key ); - $keysByTable[$serverIndex][$tableName][] = $key; + list( $shardIndex, $tableName ) = $this->getTableByKey( $key ); + $keysByTable[$shardIndex][$tableName][] = $key; } $exptime = $this->getExpirationAsTimestamp( $exptime ); @@ -361,14 +362,14 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { $result = true; /** @noinspection PhpUnusedLocalVariableInspection */ $silenceScope = $this->silenceTransactionProfiler(); - foreach ( $keysByTable as $serverIndex => $serverKeys ) { + foreach ( $keysByTable as $shardIndex => $serverKeys ) { $db = null; // in case of connection failure try { - $db = $this->getDB( $serverIndex ); + $db = $this->getConnection( $shardIndex ); $this->occasionallyGarbageCollect( $db ); // expire old entries if any $dbExpiry = $exptime ? $db->timestamp( $exptime ) : $this->getMaxDateTime( $db ); } catch ( DBError $e ) { - $this->handleWriteError( $e, $db, $serverIndex ); + $this->handleWriteError( $e, $db, $shardIndex ); $result = false; continue; } @@ -384,14 +385,14 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { $dbExpiry ) && $result; } catch ( DBError $e ) { - $this->handleWriteError( $e, $db, $serverIndex ); + $this->handleWriteError( $e, $db, $shardIndex ); $result = false; } } } - if ( ( $flags & self::WRITE_SYNC ) == self::WRITE_SYNC ) { + if ( $this->fieldHasFlags( $flags, self::WRITE_SYNC ) ) { $result = $this->waitForReplication() && $result; } @@ -467,19 +468,19 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { return $this->modifyMulti( [ $key => $value ], $exptime, $flags, self::$OP_SET ); } - public function add( $key, $value, $exptime = 0, $flags = 0 ) { + protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) { return $this->modifyMulti( [ $key => $value ], $exptime, $flags, self::$OP_ADD ); } - protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { - list( $serverIndex, $tableName ) = $this->getTableByKey( $key ); + protected function doCas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) { + list( $shardIndex, $tableName ) = $this->getTableByKey( $key ); $exptime = $this->getExpirationAsTimestamp( $exptime ); /** @noinspection PhpUnusedLocalVariableInspection */ $silenceScope = $this->silenceTransactionProfiler(); $db = null; // in case of connection failure try { - $db = $this->getDB( $serverIndex ); + $db = $this->getConnection( $shardIndex ); // (T26425) use a replace if the db supports it instead of // delete/insert to avoid clashes with conflicting keynames $db->update( @@ -499,12 +500,17 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { __METHOD__ ); } catch ( DBQueryError $e ) { - $this->handleWriteError( $e, $db, $serverIndex ); + $this->handleWriteError( $e, $db, $shardIndex ); return false; } - return (bool)$db->affectedRows(); + $success = (bool)$db->affectedRows(); + if ( $this->fieldHasFlags( $flags, self::WRITE_SYNC ) ) { + $success = $this->waitForReplication() && $success; + } + + return $success; } protected function doDeleteMulti( array $keys, $flags = 0 ) { @@ -520,15 +526,15 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { return $this->modifyMulti( [ $key => null ], 0, $flags, self::$OP_DELETE ); } - public function incr( $key, $step = 1 ) { - list( $serverIndex, $tableName ) = $this->getTableByKey( $key ); + public function incr( $key, $step = 1, $flags = 0 ) { + list( $shardIndex, $tableName ) = $this->getTableByKey( $key ); $newCount = false; /** @noinspection PhpUnusedLocalVariableInspection */ $silenceScope = $this->silenceTransactionProfiler(); $db = null; // in case of connection failure try { - $db = $this->getDB( $serverIndex ); + $db = $this->getConnection( $shardIndex ); $encTimestamp = $db->addQuotes( $db->timestamp() ); $db->update( $tableName, @@ -548,19 +554,14 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { } } } catch ( DBError $e ) { - $this->handleWriteError( $e, $db, $serverIndex ); + $this->handleWriteError( $e, $db, $shardIndex ); } return $newCount; } - public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) { - $ok = $this->mergeViaCas( $key, $callback, $exptime, $attempts, $flags ); - if ( ( $flags & self::WRITE_SYNC ) == self::WRITE_SYNC ) { - $ok = $this->waitForReplication() && $ok; - } - - return $ok; + public function decr( $key, $value = 1, $flags = 0 ) { + return $this->incr( $key, -$value, $flags ); } public function changeTTLMulti( array $keys, $exptime, $flags = 0 ) { @@ -581,7 +582,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * @param string $exptime * @return bool */ - protected function isExpired( $db, $exptime ) { + private function isExpired( $db, $exptime ) { return ( $exptime != $this->getMaxDateTime( $db ) && wfTimestamp( TS_UNIX, $exptime ) < $this->getCurrentTime() @@ -592,7 +593,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * @param IDatabase $db * @return string */ - protected function getMaxDateTime( $db ) { + private function getMaxDateTime( $db ) { if ( (int)$this->getCurrentTime() > 0x7fffffff ) { return $db->timestamp( 1 << 62 ); } else { @@ -604,7 +605,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * @param IDatabase $db * @throws DBError */ - protected function occasionallyGarbageCollect( IDatabase $db ) { + private function occasionallyGarbageCollect( IDatabase $db ) { if ( // Random purging is enabled $this->purgePeriod && @@ -642,16 +643,16 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { /** @noinspection PhpUnusedLocalVariableInspection */ $silenceScope = $this->silenceTransactionProfiler(); - $serverIndexes = range( 0, $this->numServers - 1 ); - shuffle( $serverIndexes ); + $shardIndexes = range( 0, $this->numServerShards - 1 ); + shuffle( $shardIndexes ); $ok = true; $keysDeletedCount = 0; - foreach ( $serverIndexes as $numServersDone => $serverIndex ) { + foreach ( $shardIndexes as $numServersDone => $shardIndex ) { $db = null; // in case of connection failure try { - $db = $this->getDB( $serverIndex ); + $db = $this->getConnection( $shardIndex ); $this->deleteServerObjectsExpiringBefore( $db, $timestamp, @@ -661,7 +662,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { $keysDeletedCount ); } catch ( DBError $e ) { - $this->handleWriteError( $e, $db, $serverIndex ); + $this->handleWriteError( $e, $db, $shardIndex ); $ok = false; } } @@ -687,7 +688,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { &$keysDeletedCount = 0 ) { $cutoffUnix = wfTimestamp( TS_UNIX, $timestamp ); - $shardIndexes = range( 0, $this->shards - 1 ); + $shardIndexes = range( 0, $this->numTableShards - 1 ); shuffle( $shardIndexes ); foreach ( $shardIndexes as $numShardsDone => $shardIndex ) { @@ -732,13 +733,13 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { if ( $lag ) { $remainingLag = $cutoffUnix - wfTimestamp( TS_UNIX, $continue ); $processedLag = max( $lag - $remainingLag, 0 ); - $doneRatio = ( $numShardsDone + $processedLag / $lag ) / $this->shards; + $doneRatio = ( $numShardsDone + $processedLag / $lag ) / $this->numTableShards; } else { $doneRatio = 1; } - $overallRatio = ( $doneRatio / $this->numServers ) - + ( $serversDoneCount / $this->numServers ); + $overallRatio = ( $doneRatio / $this->numServerShards ) + + ( $serversDoneCount / $this->numServerShards ); call_user_func( $progressCallback, $overallRatio * 100 ); } } while ( $res->numRows() && $keysDeletedCount < $limit ); @@ -753,15 +754,15 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { public function deleteAll() { /** @noinspection PhpUnusedLocalVariableInspection */ $silenceScope = $this->silenceTransactionProfiler(); - for ( $serverIndex = 0; $serverIndex < $this->numServers; $serverIndex++ ) { + for ( $shardIndex = 0; $shardIndex < $this->numServerShards; $shardIndex++ ) { $db = null; // in case of connection failure try { - $db = $this->getDB( $serverIndex ); - for ( $i = 0; $i < $this->shards; $i++ ) { + $db = $this->getConnection( $shardIndex ); + for ( $i = 0; $i < $this->numTableShards; $i++ ) { $db->delete( $this->getTableNameByShard( $i ), '*', __METHOD__ ); } } catch ( DBError $e ) { - $this->handleWriteError( $e, $db, $serverIndex ); + $this->handleWriteError( $e, $db, $shardIndex ); return false; } } @@ -779,11 +780,11 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { } } - list( $serverIndex ) = $this->getTableByKey( $key ); + list( $shardIndex ) = $this->getTableByKey( $key ); $db = null; // in case of connection failure try { - $db = $this->getDB( $serverIndex ); + $db = $this->getConnection( $shardIndex ); $ok = $db->lock( $key, __METHOD__, $timeout ); if ( $ok ) { $this->locks[$key] = [ 'class' => $rclass, 'depth' => 1 ]; @@ -796,7 +797,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { return $ok; } catch ( DBError $e ) { - $this->handleWriteError( $e, $db, $serverIndex ); + $this->handleWriteError( $e, $db, $shardIndex ); $ok = false; } @@ -811,11 +812,11 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { if ( --$this->locks[$key]['depth'] <= 0 ) { unset( $this->locks[$key] ); - list( $serverIndex ) = $this->getTableByKey( $key ); + list( $shardIndex ) = $this->getTableByKey( $key ); $db = null; // in case of connection failure try { - $db = $this->getDB( $serverIndex ); + $db = $this->getConnection( $shardIndex ); $ok = $db->unlock( $key, __METHOD__ ); if ( !$ok ) { $this->logger->warning( @@ -824,7 +825,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { ); } } catch ( DBError $e ) { - $this->handleWriteError( $e, $db, $serverIndex ); + $this->handleWriteError( $e, $db, $shardIndex ); $ok = false; } @@ -866,9 +867,9 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { } if ( function_exists( 'gzinflate' ) ) { - Wikimedia\suppressWarnings(); + AtEase::suppressWarnings(); $decomp = gzinflate( $serial ); - Wikimedia\restoreWarnings(); + AtEase::restoreWarnings(); if ( $decomp !== false ) { $serial = $decomp; @@ -882,11 +883,11 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * Handle a DBError which occurred during a read operation. * * @param DBError $exception - * @param int $serverIndex + * @param int $shardIndex */ - protected function handleReadError( DBError $exception, $serverIndex ) { + private function handleReadError( DBError $exception, $shardIndex ) { if ( $exception instanceof DBConnectionError ) { - $this->markServerDown( $exception, $serverIndex ); + $this->markServerDown( $exception, $shardIndex ); } $this->setAndLogDBError( $exception ); @@ -897,12 +898,12 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * * @param DBError $exception * @param IDatabase|null $db DB handle or null if connection failed - * @param int $serverIndex + * @param int $shardIndex * @throws Exception */ - protected function handleWriteError( DBError $exception, $db, $serverIndex ) { + private function handleWriteError( DBError $exception, $db, $shardIndex ) { if ( !( $db instanceof IDatabase ) ) { - $this->markServerDown( $exception, $serverIndex ); + $this->markServerDown( $exception, $shardIndex ); } $this->setAndLogDBError( $exception ); @@ -926,37 +927,37 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * Mark a server down due to a DBConnectionError exception * * @param DBError $exception - * @param int $serverIndex + * @param int $shardIndex */ - protected function markServerDown( DBError $exception, $serverIndex ) { - unset( $this->conns[$serverIndex] ); // bug T103435 + private function markServerDown( DBError $exception, $shardIndex ) { + unset( $this->conns[$shardIndex] ); // bug T103435 $now = $this->getCurrentTime(); - if ( isset( $this->connFailureTimes[$serverIndex] ) ) { - if ( $now - $this->connFailureTimes[$serverIndex] >= 60 ) { - unset( $this->connFailureTimes[$serverIndex] ); - unset( $this->connFailureErrors[$serverIndex] ); + if ( isset( $this->connFailureTimes[$shardIndex] ) ) { + if ( $now - $this->connFailureTimes[$shardIndex] >= 60 ) { + unset( $this->connFailureTimes[$shardIndex] ); + unset( $this->connFailureErrors[$shardIndex] ); } else { - $this->logger->debug( __METHOD__ . ": Server #$serverIndex already down" ); + $this->logger->debug( __METHOD__ . ": Server #$shardIndex already down" ); return; } } - $this->logger->info( __METHOD__ . ": Server #$serverIndex down until " . ( $now + 60 ) ); - $this->connFailureTimes[$serverIndex] = $now; - $this->connFailureErrors[$serverIndex] = $exception; + $this->logger->info( __METHOD__ . ": Server #$shardIndex down until " . ( $now + 60 ) ); + $this->connFailureTimes[$shardIndex] = $now; + $this->connFailureErrors[$shardIndex] = $exception; } /** * Create shard tables. For use from eval.php. */ public function createTables() { - for ( $serverIndex = 0; $serverIndex < $this->numServers; $serverIndex++ ) { - $db = $this->getDB( $serverIndex ); + for ( $shardIndex = 0; $shardIndex < $this->numServerShards; $shardIndex++ ) { + $db = $this->getConnection( $shardIndex ); if ( $db->getType() !== 'mysql' ) { throw new MWException( __METHOD__ . ' is not supported on this DB server' ); } - for ( $i = 0; $i < $this->shards; $i++ ) { + for ( $i = 0; $i < $this->numTableShards; $i++ ) { $db->query( 'CREATE TABLE ' . $db->tableName( $this->getTableNameByShard( $i ) ) . ' LIKE ' . $db->tableName( 'objectcache' ), @@ -968,11 +969,11 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { /** * @return bool Whether the main DB is used, e.g. wfGetDB( DB_MASTER ) */ - protected function usesMainDB() { + private function usesMainDB() { return !$this->serverInfos; } - protected function waitForReplication() { + private function waitForReplication() { if ( !$this->usesMainDB() ) { // Custom DB server list; probably doesn't use replication return true; @@ -1007,12 +1008,17 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { } /** - * Returns a ScopedCallback which resets the silence flag in the transaction profiler when it is - * destroyed on the end of a scope, for example on return or throw - * @return ScopedCallback - * @since 1.32 + * Silence the transaction profiler until the return value falls out of scope + * + * @return ScopedCallback|null */ - protected function silenceTransactionProfiler() { + private function silenceTransactionProfiler() { + if ( !$this->usesMainDB() ) { + // Custom DB is configured which either has no TransactionProfiler injected, + // or has one specific for cache use, which we shouldn't silence + return null; + } + $trxProfiler = Profiler::instance()->getTransactionProfiler(); $oldSilenced = $trxProfiler->setSilenced( true ); return new ScopedCallback( function () use ( $trxProfiler, $oldSilenced ) { diff --git a/includes/page/ImageHistoryList.php b/includes/page/ImageHistoryList.php index e488b6c1f7..2de82bf760 100644 --- a/includes/page/ImageHistoryList.php +++ b/includes/page/ImageHistoryList.php @@ -91,7 +91,9 @@ class ImageHistoryList extends ContextSource { . Xml::openElement( 'table', [ 'class' => 'wikitable filehistory' ] ) . "\n" . '' . ( $this->current->isLocal() - && ( $this->getUser()->isAllowedAny( 'delete', 'deletedhistory' ) ) ? '' : '' ) + && ( MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasAnyRight( $this->getUser(), 'delete', 'deletedhistory' ) ) ? '' : '' ) . '' . $this->msg( 'filehist-datetime' )->escaped() . '' . ( $this->showThumb ? '' . $this->msg( 'filehist-thumb' )->escaped() . '' : '' ) . '' . $this->msg( 'filehist-dimensions' )->escaped() . '' @@ -126,7 +128,10 @@ class ImageHistoryList extends ContextSource { $row = $selected = ''; // Deletion link - if ( $local && ( $user->isAllowedAny( 'delete', 'deletedhistory' ) ) ) { + if ( $local && ( MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasAnyRight( $user, 'delete', 'deletedhistory' ) ) + ) { $row .= ''; # Link to remove from history if ( $user->isAllowed( 'delete' ) ) { diff --git a/includes/page/MovePageFactory.php b/includes/page/MovePageFactory.php new file mode 100644 index 0000000000..26da151844 --- /dev/null +++ b/includes/page/MovePageFactory.php @@ -0,0 +1,91 @@ +assertRequiredOptions( self::$constructorOptions ); + + $this->options = $options; + $this->loadBalancer = $loadBalancer; + $this->nsInfo = $nsInfo; + $this->watchedItems = $watchedItems; + $this->permMgr = $permMgr; + $this->repoGroup = $repoGroup; + } + + /** + * @param Title $from + * @param Title $to + * @return MovePage + */ + public function newMovePage( Title $from, Title $to ) : MovePage { + return new MovePage( $from, $to, $this->options, $this->loadBalancer, $this->nsInfo, + $this->watchedItems, $this->permMgr, $this->repoGroup ); + } +} diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 8cc5a39b51..460753514c 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3249,7 +3249,10 @@ class WikiPage implements Page, IDBAccessObject { $flags |= EDIT_MINOR; } - if ( $bot && ( $guser->isAllowedAny( 'markbotedits', 'bot' ) ) ) { + if ( $bot && ( MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasAnyRight( $guser, 'markbotedits', 'bot' ) ) + ) { $flags |= EDIT_FORCE_BOT; } diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index e5bf94a602..a19f86ca67 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -20,6 +20,7 @@ * @file * @ingroup Parser */ +use MediaWiki\BadFileLookup; use MediaWiki\Config\ServiceOptions; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkRendererFactory; @@ -299,6 +300,9 @@ class Parser { /** @var LoggerInterface */ private $logger; + /** @var BadFileLookup */ + private $badFileLookup; + /** * TODO Make this a const when HHVM support is dropped (T192166) * @@ -339,6 +343,7 @@ class Parser { * @param LinkRendererFactory|null $linkRendererFactory * @param NamespaceInfo|null $nsInfo * @param LoggerInterface|null $logger + * @param BadFileLookup|null $badFileLookup */ public function __construct( $svcOptions = null, @@ -349,9 +354,9 @@ class Parser { SpecialPageFactory $spFactory = null, $linkRendererFactory = null, $nsInfo = null, - $logger = null + $logger = null, + BadFileLookup $badFileLookup = null ) { - $services = MediaWikiServices::getInstance(); if ( !$svcOptions || is_array( $svcOptions ) ) { // Pre-1.34 calling convention is the first parameter is just ParserConf, the seventh is // Config, and the eighth is LinkRendererFactory. @@ -363,8 +368,8 @@ class Parser { $this->mConf['preprocessorClass'] = self::getDefaultPreprocessorClass(); } $this->svcOptions = new ServiceOptions( self::$constructorOptions, - $this->mConf, - func_num_args() > 6 ? func_get_arg( 6 ) : $services->getMainConfig() + $this->mConf, func_num_args() > 6 + ? func_get_arg( 6 ) : MediaWikiServices::getInstance()->getMainConfig() ); $linkRendererFactory = func_num_args() > 7 ? func_get_arg( 7 ) : null; $nsInfo = func_num_args() > 8 ? func_get_arg( 8 ) : null; @@ -386,15 +391,19 @@ class Parser { self::EXT_LINK_URL_CLASS . '*)\p{Zs}*([^\]\\x00-\\x08\\x0a-\\x1F\\x{FFFD}]*?)\]/Su'; $this->magicWordFactory = $magicWordFactory ?? - $services->getMagicWordFactory(); + MediaWikiServices::getInstance()->getMagicWordFactory(); - $this->contLang = $contLang ?? $services->getContentLanguage(); + $this->contLang = $contLang ?? MediaWikiServices::getInstance()->getContentLanguage(); - $this->factory = $factory ?? $services->getParserFactory(); - $this->specialPageFactory = $spFactory ?? $services->getSpecialPageFactory(); - $this->linkRendererFactory = $linkRendererFactory ?? $services->getLinkRendererFactory(); - $this->nsInfo = $nsInfo ?? $services->getNamespaceInfo(); + $this->factory = $factory ?? MediaWikiServices::getInstance()->getParserFactory(); + $this->specialPageFactory = $spFactory ?? + MediaWikiServices::getInstance()->getSpecialPageFactory(); + $this->linkRendererFactory = $linkRendererFactory ?? + MediaWikiServices::getInstance()->getLinkRendererFactory(); + $this->nsInfo = $nsInfo ?? MediaWikiServices::getInstance()->getNamespaceInfo(); $this->logger = $logger ?: new NullLogger(); + $this->badFileLookup = $badFileLookup ?? + MediaWikiServices::getInstance()->getBadFileLookup(); } /** @@ -468,8 +477,7 @@ class Parser { */ public function clearState() { $this->firstCallInit(); - $this->mOutput = new ParserOutput; - $this->mOptions->registerWatcher( [ $this->mOutput, 'recordOption' ] ); + $this->resetOutput(); $this->mAutonumber = 0; $this->mIncludeCount = []; $this->mLinkHolders = new LinkHolderArray( $this ); @@ -512,6 +520,14 @@ class Parser { Hooks::run( 'ParserClearState', [ &$parser ] ); } + /** + * Reset the ParserOutput + */ + public function resetOutput() { + $this->mOutput = new ParserOutput; + $this->mOptions->registerWatcher( [ $this->mOutput, 'recordOption' ] ); + } + /** * Convert wikitext to HTML * Do not call this function recursively. @@ -522,7 +538,10 @@ class Parser { * @param ParserOptions $options * @param bool $linestart * @param bool $clearState - * @param int|null $revid Number to pass in {{REVISIONID}} + * @param int|null $revid ID of the revision being rendered. This is used to render + * REVISION* magic words. 0 means that any current revision will be used. Null means + * that {{REVISIONID}}/{{REVISIONUSER}} will be empty and {{REVISIONTIMESTAMP}} will + * use the current timestamp. * @return ParserOutput A ParserOutput * @return-taint escaped */ @@ -1177,6 +1196,15 @@ class Parser { return $this->mStripList; } + /** + * Get the StripState + * + * @return StripState + */ + public function getStripState() { + return $this->mStripState; + } + /** * Add an item to the strip state * Returns the unique tag which must be inserted into the stripped text @@ -2481,7 +2509,7 @@ class Parser { } if ( $ns == NS_FILE ) { - if ( !wfIsBadImage( $nt->getDBkey(), $this->mTitle ) ) { + if ( !$this->badFileLookup->isBadFile( $nt->getDBkey(), $this->mTitle ) ) { if ( $wasblank ) { # if no parameters were passed, $text # becomes something like "File:Foo.png", @@ -3742,21 +3770,22 @@ class Parser { // Defaults to Parser::statelessFetchTemplate() $templateCb = $this->mOptions->getTemplateCallback(); $stuff = call_user_func( $templateCb, $title, $this ); - // We use U+007F DELETE to distinguish strip markers from regular text. + $rev = $stuff['revision'] ?? null; $text = $stuff['text']; if ( is_string( $stuff['text'] ) ) { + // We use U+007F DELETE to distinguish strip markers from regular text $text = strtr( $text, "\x7f", "?" ); } $finalTitle = $stuff['finalTitle'] ?? $title; - if ( isset( $stuff['deps'] ) ) { - foreach ( $stuff['deps'] as $dep ) { - $this->mOutput->addTemplate( $dep['title'], $dep['page_id'], $dep['rev_id'] ); - if ( $dep['title']->equals( $this->getTitle() ) ) { - // Self-transclusion; final result may change based on the new page version - $this->setOutputFlag( 'vary-revision', 'Self transclusion' ); - } + foreach ( ( $stuff['deps'] ?? [] ) as $dep ) { + $this->mOutput->addTemplate( $dep['title'], $dep['page_id'], $dep['rev_id'] ); + if ( $dep['title']->equals( $this->getTitle() ) && $rev instanceof Revision ) { + // Self-transclusion; final result may change based on the new page version + $this->setOutputFlag( 'vary-revision-sha1', 'Self transclusion' ); + $this->getOutput()->setRevisionUsedSha1Base36( $rev->getSha1() ); } } + return [ $text, $finalTitle ]; } @@ -3782,6 +3811,7 @@ class Parser { $text = $skip = false; $finalTitle = $title; $deps = []; + $rev = null; # Loop to fetch the article, with up to 1 redirect for ( $i = 0; $i < 2 && is_object( $title ); $i++ ) { @@ -3817,13 +3847,15 @@ class Parser { $deps[] = [ 'title' => $title, 'page_id' => $title->getArticleID(), - 'rev_id' => $rev_id ]; + 'rev_id' => $rev_id + ]; if ( $rev && !$title->equals( $rev->getTitle() ) ) { # We fetched a rev from a different title; register it too... $deps[] = [ 'title' => $rev->getTitle(), 'page_id' => $rev->getPage(), - 'rev_id' => $rev_id ]; + 'rev_id' => $rev_id + ]; } if ( $rev ) { @@ -3857,9 +3889,11 @@ class Parser { $title = $content->getRedirectTarget(); } return [ + 'revision' => $rev, 'text' => $text, 'finalTitle' => $finalTitle, - 'deps' => $deps ]; + 'deps' => $deps + ]; } /** @@ -4857,11 +4891,15 @@ class Parser { * @param ParserOptions $options * @param int $outputType * @param bool $clearState + * @param int|null $revId */ public function startExternalParse( Title $title = null, ParserOptions $options, - $outputType, $clearState = true + $outputType, $clearState = true, $revId = null ) { $this->startParse( $title, $options, $outputType, $clearState ); + if ( $revId !== null ) { + $this->mRevisionId = $revId; + } } /** diff --git a/includes/parser/ParserFactory.php b/includes/parser/ParserFactory.php index 3d15e86fd5..bab1f364f6 100644 --- a/includes/parser/ParserFactory.php +++ b/includes/parser/ParserFactory.php @@ -19,6 +19,7 @@ * @ingroup Parser */ +use MediaWiki\BadFileLookup; use MediaWiki\Config\ServiceOptions; use MediaWiki\Linker\LinkRendererFactory; use MediaWiki\MediaWikiServices; @@ -54,6 +55,9 @@ class ParserFactory { /** @var LoggerInterface */ private $logger; + /** @var BadFileLookup */ + private $badFileLookup; + /** * Old parameter list, which we support for backwards compatibility, were: * array $parserConf See $wgParserConf documentation @@ -77,6 +81,7 @@ class ParserFactory { * @param LinkRendererFactory $linkRendererFactory * @param NamespaceInfo|LinkRendererFactory|null $nsInfo * @param LoggerInterface|null $logger + * @param BadFileLookup|null $badFileLookup * @since 1.32 */ public function __construct( @@ -87,7 +92,8 @@ class ParserFactory { SpecialPageFactory $spFactory, $linkRendererFactory, $nsInfo = null, - $logger = null + $logger = null, + BadFileLookup $badFileLookup = null ) { // @todo Do we need to retain compat for constructing this class directly? if ( !$nsInfo ) { @@ -119,6 +125,8 @@ class ParserFactory { $this->linkRendererFactory = $linkRendererFactory; $this->nsInfo = $nsInfo; $this->logger = $logger ?: new NullLogger(); + $this->badFileLookup = $badFileLookup ?? + MediaWikiServices::getInstance()->getBadFileLookup(); } /** @@ -135,7 +143,8 @@ class ParserFactory { $this->specialPageFactory, $this->linkRendererFactory, $this->nsInfo, - $this->logger + $this->logger, + $this->badFileLookup ); } } diff --git a/includes/parser/Sanitizer.php b/includes/parser/Sanitizer.php index 8e0cf5c877..d4110468b6 100644 --- a/includes/parser/Sanitizer.php +++ b/includes/parser/Sanitizer.php @@ -2036,6 +2036,7 @@ class Sanitizer { * * @param string $html HTML fragment * @return string + * @return-taint tainted */ static function stripAllTags( $html ) { // Use RemexHtml to tokenize $html and extract the text diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 9cae73c907..3e65f6c1ba 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -146,7 +146,7 @@ class ExtensionRegistry { * be loaded then). */ public function loadFromQueue() { - global $wgVersion, $wgDevelopmentWarnings; + global $wgVersion, $wgDevelopmentWarnings, $wgObjectCaches; if ( !$this->queued ) { return; } @@ -169,10 +169,9 @@ class ExtensionRegistry { // We use a try/catch because we don't want to fail here // if $wgObjectCaches is not configured properly for APC setup try { - // Don't use MediaWikiServices here to prevent instantiating it before extensions have - // been loaded + // Avoid MediaWikiServices to prevent instantiating it before extensions have loaded $cacheId = ObjectCache::detectLocalServerCache(); - $cache = ObjectCache::newFromId( $cacheId ); + $cache = ObjectCache::newFromParams( $wgObjectCaches[$cacheId] ); } catch ( InvalidArgumentException $e ) { $cache = new EmptyBagOStuff(); } diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 9892b15705..0785225d2c 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -661,8 +661,9 @@ class ResourceLoader implements LoggerAwareInterface { // Do not allow private modules to be loaded from the web. // This is a security issue, see T36907. if ( $module->getGroup() === 'private' ) { + // Not a serious error, just means something is trying to access it (T101806) $this->logger->debug( "Request for private module '$name' denied" ); - $this->errors[] = "Cannot show private module \"$name\""; + $this->errors[] = "Cannot build private module \"$name\""; continue; } $modules[$name] = $module; diff --git a/includes/resourceloader/ResourceLoaderClientHtml.php b/includes/resourceloader/ResourceLoaderClientHtml.php index d59e1c8c9a..e17b393a57 100644 --- a/includes/resourceloader/ResourceLoaderClientHtml.php +++ b/includes/resourceloader/ResourceLoaderClientHtml.php @@ -143,15 +143,15 @@ class ResourceLoaderClientHtml { $group = $module->getGroup(); $context = $this->getContext( $group, ResourceLoaderModule::TYPE_COMBINED ); - if ( $module->isKnownEmpty( $context ) ) { - // Avoid needless request or embed for empty module - $data['states'][$name] = 'ready'; - continue; - } + $shouldEmbed = $module->shouldEmbedModule( $this->context ); - if ( $group === 'user' || $module->shouldEmbedModule( $this->context ) ) { - // Call makeLoad() to decide how to load these, instead of - // loading via mw.loader.load(). + if ( ( $group === 'user' || $shouldEmbed ) && $module->isKnownEmpty( $context ) ) { + // This is a user-specific or embedded module, which means its output + // can be specific to the current page or user. As such, we can optimise + // the way we load it based on the current version of the module. + // Avoid needless embed for empty module, preset ready state. + $data['states'][$name] = 'ready'; + } elseif ( $group === 'user' || $shouldEmbed ) { // - For group=user: We need to provide a pre-generated load.php // url to the client that has the 'user' and 'version' parameters // filled in. Without this, the client would wrongly use the static @@ -187,15 +187,30 @@ class ResourceLoaderClientHtml { $group = $module->getGroup(); $context = $this->getContext( $group, ResourceLoaderModule::TYPE_STYLES ); - // Avoid needless request for empty module - if ( !$module->isKnownEmpty( $context ) ) { - if ( $module->shouldEmbedModule( $this->context ) ) { - // Embed via style element + if ( $module->shouldEmbedModule( $this->context ) ) { + // Avoid needless embed for private embeds we know are empty. + // (Set "ready" state directly instead, which we do a few lines above.) + if ( !$module->isKnownEmpty( $context ) ) { + // Embed via